subject
Computers and Technology, 14.04.2020 18:27 kamraaa

Create a program that reads a list of states from an input file, puts them in order, and displays the sorted list to the user. Description Read in a list of states from a file, and output those states in alphabetical order. Provided input files A single input file named states. txt is provided that lists states of the United States - one state per row. Some states have lowercase letters, where some begin with uppercase letters. As a reminder, lowercase letters come after uppercase letters alphabetically. The states are in a random order. The file has the following format: Michigan california New Mexico Texas nevada ... Objectives Write the following in main. py: Open the states. txt file. Create a list called ‘states’ where each element in the list is one of the states read from the file. Do not change the text that is read from the file. Print to the user (not to a file) an alphabetized list of all the states, with one state per line. For example, Alabama Alaska Arizona ... Note: You will lose points if you do not correctly work with the file. If you decide to just use a print statement to display the output, without using file input, and pass the test case with 100%, you will eventually lose points. This program will be checked after the deadline. In short, do not try to cheat the system by simply displaying the list of states.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 22:00, bb1593
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
image
Computers and Technology, 23.06.2019 23:30, yasarhan2
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
image
Computers and Technology, 24.06.2019 23:00, elha20
The valves of the heart and veins are similar in that they both
Answers: 1
image
Computers and Technology, 25.06.2019 01:30, jamesvazquez3135
The physical parts or components of a computer system is called .
Answers: 1
You know the right answer?
Create a program that reads a list of states from an input file, puts them in order, and displays th...

Questions in other subjects:

Konu
Physics, 09.09.2021 09:50
Konu
Mathematics, 09.09.2021 09:50
Konu
Mathematics, 09.09.2021 09:50