Guest User

Untitled

a guest
Feb 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. print('WELCOME TO ONLINE QUIZ ')
  2. print("")
  3.  
  4. begin = input('Would you like to proceed? yes/no: ')
  5. if begin == 'yes':
  6. print('')
  7. print('Get Ready... ')
  8. print("")
  9. print('The questions below are multiple quiz.\n Good Luck! ')
  10. print("")
  11. print('a. Mt. Kenya')
  12. print('b. Mt. Kilimanjaro')
  13. print('c. Mt. Longonot')
  14. print('d. Mt. Elgon')
  15. print("")
  16. result = 0
  17. q1 = input('Which is the highest mountain in East Africa? :')
  18. if q1 == 'b':
  19. result = result + 1
  20. q2 = input('Which mountain has a crater lake? :')
  21. if q2 == 'a':
  22. result = result + 1
  23. q3 = input('Which mountain is a dormant volcano? :')
  24. if q3 == 'c':
  25. result = result + 1
  26.  
  27. q4 = input('Which mountain is the pride of Western Kenya? :')
  28. if q4 == 'd':
  29. result = result + 1
  30. print('')
  31. print('Your score is {} out of 4 questions'.format(result))
  32. print('')
  33. if result != 4:
  34. q = input('Would you like to retake the quiz? Yes/No : ')
  35. if q == 'No' or q == 'no':
  36. print('')
  37. print('Your score is saved. Goodbye.')
  38. else:
  39. if q == 'Yes' or q == 'yes':
  40. print('')
  41. print('Get ready to redo the whole test again...')
  42.  
  43.  
  44. elif begin == 'no':
  45. print('Goodbye..')
  46.  
  47.  
  48. else:
  49. print('')
  50. print('invalid choice.. Kindly input yes or no ')
Add Comment
Please, Sign In to add comment