Question: Need help with coding. Make a List ( 25 points) Write a program called citylist.py, in which the user inputs the names of cities, which

Need help with coding.
Need help with coding. Make a List ( 25 points) Write a

Make a List ( 25 points) Write a program called citylist.py, in which the user inputs the names of cities, which get added to a list. Your program should: - Include a comment in the first line with your name. - Include comments describing each major section of code. - Create a list - it should initially be empty. - Ask the user to input the name of a city or hit enter to end the list. - If the user adds the name of a city (i.e., anything other than a blank value): - Add the name to the list. - Tell the user that they've added [city] to the list (where [city] is the name that just got added). - Ask the user (again) to input a city name - and keep asking until the user hits enter without adding another name (i.e., enters a blank value). - Once the user enters a blank value: - Tell the user how many names they added to the list. - Using a for-loop, output all the names that are in the list, using a separate line for each name. - Do not include the blank value in the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!