subject
Computers and Technology, 05.05.2020 23:30 gloryxu

In this lab, you use what you have learned about searching a list to find an exact match to complete a partially prewritten Python program. The program uses a list that contains valid names for 10 cities in Michigan. You ask the user to enter a city name; your program then searches the list for that city name. If it is not found, the program should print a message that informs the user the city name is not found in the list of valid cities in Michigan. The starter file provided for this lab includes input statements. You need to write code to examine all the items in the list and test for a match. You also need to determine if you should print the "Not a city in Michigan." message. Comments in the code tell you where to write your statements.
Instructions:Study the prewritten code to make sure you understand it.
Write a loop statement that examines the names of cities stored in the list?
Write code that tests for a match?
Write code that, when appropriate, prints the message "Not a city in Michigan"?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
question
Computers and Technology, 22.06.2019 06:40
Match the personality traits with their description
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 24.06.2019 19:20
Which command suppresses the visibility of a particular row or column in a worksheet?
Answers: 1
You know the right answer?
In this lab, you use what you have learned about searching a list to find an exact match to complete...
Questions
question
World Languages, 03.09.2020 02:01
question
Mathematics, 03.09.2020 02:01
question
Social Studies, 03.09.2020 02:01
Questions on the website: 13722360