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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:00, mrnotsosmart744
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, taytay1828
What are the 12 colors of the spectrum called?
Answers: 1
image
Computers and Technology, 24.06.2019 00:40, ndurairajownkpq
What social factors affect your health
Answers: 3
image
Computers and Technology, 24.06.2019 17:00, mrsrobinson1014
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
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 in other subjects:

Konu
Mathematics, 08.10.2020 23:01
Konu
Mathematics, 08.10.2020 23:01
Konu
History, 08.10.2020 23:01
Konu
History, 08.10.2020 23:01