Bryce H.

asked • 01/21/23

python programming

temperature = int(input("What temperature is the weather today?"))
if temperature < 40:
print("Wear a warm coat")
elif temperature < 70:
print("Wear a light jacket")
elif temperature < 100:
print("Wear something cool")
if temperature >= 100:
print(input("Do you have air condition at home?"))

what do i need to add to this so that when I answer yes or not to the last question like so:

100 or greater: Prompt “Do you have air conditioning at home? (yes/no)”

If yes: print: “Stay at home.”

If no: print: “Bummer, try a swimming pool.”


2 Answers By Expert Tutors

By:

Joey L. answered • 01/22/23

Tutor
New to Wyzant

Passionate Computer Science Tutor

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.