Expert Answer

Write a program that allows the user to navigate the lines oftext in a file. The program should prompt the user for a filenameand input the lines of text into a list. Theprogram then enters a loop in which it prints the number of linesin the file and prompts the user for a line number. Actual linenumbers range from 1 to the number of lines in the file. If theinput is 0, the program quits. Otherwise, the program prints theline associated with that number.​ (python is used for thisquestion)

Expert Answer

Write a program that prompts the user to enter two points (x1,y1) and (x2, y2). Calculate and display the distance between thetwo points using the formula below. Round the answer up to 2decimal points. You can use Math.pow(a,0.5) to compute the squareroot of an expression. Math.pow() returns a double.

For example, the distance between thepoints (−2, −3) and (−4, 4) is approximately 7.28, as shownbelow.

please do this in java, make one class without a main method andone with a main method to call a method public doublecalculateDistance(double x1, double x2, double y1, double y2)

using scanner class thank you.

Expert Answer

Write a script that does the following: 1- Ask the user for anumerical input (‘Please Enter a Number: ‘), then generate a randomvector contains real numbers were the number of elements equal tothe input and make the random numbers fixed from. For example, ifthe user enters 5, the code will generate a vector with 5 elements.Then fix the numbers by multiplying it from 100. 2- Make a loop torun through the vector and finds all the numbers between 60 – 80and its places and prints them out. For Example, ‘The number is 64its place is 4’.