Write a program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input 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.
A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a file. The program should output the unique words and their frequencies in alphabetical order.
A list is sorted in ascending order if it is empty or each item except the last one is less than or equal to its successor. Define a function isSorted that expects a list as an argument and returns True if the list is sorted, or returns Falseotherwise. (Hint : For a list of length 2 or greater, loop through the list and compare pairs of items, from left to right, and return False if the first item in a pair is greater.)
Define and test a function myRange. This function should behave like Pythons standard range function, with the required and optional arguments, but should return a list. Do not use the range function in your implementation! Hints: