Advertisement
HBSB

Python 101 Evaluation Selection Using IF 2.11

Dec 2nd, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.10 KB | None | 0 0
  1. phrase=input("Shall we have a geography quiz? >")
  2. if phrase=="yes please":
  3.     print("ok here's question one")
  4. question_one=input("What is the capital of England? >")
  5. if question_one=="London":
  6.     print ("correct")
  7. else:
  8.     print("Sorry, that's the wrong answer.  Next question")
  9. question_two=input("What is the capital of Scotland? >")
  10. if question_two=="Edinburgh":
  11.     print ("correct")
  12. else:
  13.     print ("Sorry, that's the wrong answer.  Next question")
  14. question_three=input("What is the longest river in the United Kingdom? >")
  15. if question_three=="River Severn":
  16.     print ("Well done.  One last question coming up.")
  17. else:
  18.     print ("Sorry, that's the wrong answer.  Here's the last question")
  19. question_four=input("What are the capital cities of Wales and Northern Ireland? >")
  20. if question_four=="Cardiff and Belfast":
  21.     print ("correct")
  22. print("If you have all four answers correct then your knowledge of the geography of the United Kingdom is good and, we hope, will continue to grow.  If you have any wrong answers, look them up on your browser and try to remember them for next time.")
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement