Advertisement
KNenov96

Conditional Statements Advanced / 02. Summer Outfit

May 16th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.26 KB | None | 0 0
  1. degrees = int(input())
  2. daynight_time = input()
  3.  
  4. if 10 <= degrees <= 18:
  5.     if daynight_time == "Morning":
  6.         shoes = "Sneakers"
  7.         outfit = "Sweatshirt"
  8.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
  9.     elif daynight_time == "Afternoon" or daynight_time == "Evening":
  10.         shoes = "Moccasins"
  11.         outfit = "Shirt"
  12.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
  13.  
  14. elif 18 < degrees <= 24:
  15.     if daynight_time == "Afternoon":
  16.         shoes = "Sandals"
  17.         outfit = "T-Shirt"
  18.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
  19.     elif daynight_time == "Morning" or daynight_time == "Evening":
  20.         shoes = "Moccasins"
  21.         outfit = "Shirt"
  22.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
  23.  
  24. elif degrees >= 25:
  25.     if daynight_time == "Morning":
  26.         shoes = "Sandals"
  27.         outfit = "T-Shirt"
  28.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
  29.     elif daynight_time == "Afternoon":
  30.         shoes = "Barefoot"
  31.         outfit = "Swim Suit"
  32.     elif daynight_time == "Evening":
  33.         shoes = "Moccasins"
  34.         outfit = "Shirt"
  35.         print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement