Answer:
michigan = ['DETROIT',
'GRAND RAPIDS',
'WARREN',
'STERLING HEIGHTS',
'LANSING',
'ANN ARBOR',
'FLINT',
'DEARBORN',
'LIVONIA',
'WESTLAND'
]
city = input('Enter a city in Michigan: ').upper()
if city in michigan:
print('{} is a city in Michigan'.format(city))
else:
print('{} is Not a city in Michigan'.format(city))
Step-by-step explanation:
The programming language used is python.
A list containing, 10 cities in Michigan is created.
The program then asks the user to enter a city, and it converts the user's input to uppercase, to ensure that there is uniformity.
The IF and ELSE statements are used to check if the city is in Michigan, and to print a result to the screen.