Buzzbow

weather and logic

Aug 26th, 2019
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #Oh what to wear today?
  2.  
  3. def what_to_wear():
  4. weather_cold = input ("Is it cold today? Y/N \n")
  5. weather_raining = input ("Is it raining today? Y/N \n")
  6. weather_sunny = input ("Is it sunny today? Y/N \n")
  7.  
  8.  
  9. if (weather_cold == "Y") and (weather_raining == "Y"):
  10. print("wear waterproofs!")
  11. elif (weather_sunny == "Y") or (weather_raining == "Y"):
  12. weather_windy = input ("Is it windy today? Y/N \n")
  13. if (weather_windy == "N"):
  14. print("take an umbrella")
  15. else :
  16. print("take a chance might get wet!")
  17.  
  18.  
  19. what_to_wear()
Advertisement
Add Comment
Please, Sign In to add comment