Ethan H.

asked • 04/27/21

python making lists with cities

# the below list contain 10 values each
# the lists elements are all related by index position
# example Moscow, 65 , s are related
# example London, 68, sp are related

# Season and Temperature range for each season.
# w = Winter is 40 and below
# f = Fall is 41 - 65
# sp = Spring is 66 - 80
# s = Summer is 81 and over

#TO_DO:
# using the three lists below
# write out to a file the city, temperature and season(it should be) for each cities temperature
# that does not match its season from the season list.

#Output_example:
# example city moscow has temp of 65 but season of 's', the range for spring is 66 - 80, so this
# needs to be printed out.
# output example:
# Moscow 65 Fall

#Lists to Use:
cities = ["Moscow","London", "Seoul","Tokyo","Mumbai","Dubai","Toronto","Stockholm","Oslo","Wellington"]
temperature = [65, 68, 90, 25, 82, 67, 70, 30, 91, 72]
season = ["s", "sp", "f", "w", "w", "s", "sp", "s", "f", "w"]


1 Expert Answer

By:

Patrick B. answered • 04/27/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.