scipiguy

Python 101: IFs challenge

Apr 22nd, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. # Futurelearn: Python 101 from RPi Foundation - Ifs challenge
  2.  
  3. joke = input("What is black, white and red all over? ")
  4.  
  5. if joke == "a sunburned penguin":
  6.     print("Oh well done!")
  7. elif joke == "a second hand newspaper":
  8.     print("Ooh, that's a good one")
  9. elif joke == "":
  10.     print("Come on, at least try!")
  11. else:
  12.     print("Sorry, I don't know either!")
Advertisement
Add Comment
Please, Sign In to add comment