subject

Write a python program that allows the user to navigate through the lines of text in a file. the program prompts the user for a filename and inputs the lines of text into a list. the program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. actual line numbers range from 1 to the number of lines in the file. if the input is 0, the program quits. otherwise, the program prints the line associated with that number.

it should be like as this sample run follows.

enter the input file name: quotes. xtxt
i cannot open the file quotes. xtxt - check the name and try again.
enter the input file name: quotes. txt
the file has 16 lines.
enter a line number [0 to quit]: 1
1 : hakuna matata!
enter a line number [0 to quit]: -1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
Researchers measured the data speeds for a particular smartphone carrier at 50 airports. the highest speed measured was 78.1 mbps. the complete list of 50 data speeds has a mean of x overbarequals16.11 mbps and a standard deviation of sequals18.65 mbps. a. what is the difference between carrier's highest data speed and the mean of all 50 data speeds? b. how many standard deviations is that [the difference found in part (a)]? c. convert the carrier's highest data speed to a z score. d. if we consider data speeds that convert to z scores between minus2 and 2 to be neither significantly low nor significantly high, is the carrier's highest data speed significant? a. the difference is nothing mbps.
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
Write a python program that allows the user to navigate through the lines of text in a file. the pro...
Questions
question
Mathematics, 30.11.2020 22:30
question
Mathematics, 30.11.2020 22:30
question
English, 30.11.2020 22:30
question
Mathematics, 30.11.2020 22:30
question
Mathematics, 30.11.2020 22:30
Questions on the website: 13722361