Guest User

Python quiz code

a guest
Sep 28th, 2017
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.63 KB | None | 0 0
  1. import time
  2. score = 10
  3. rank = ("None")
  4. print ("Welcome to the RANDOM TOPICS quiz!")
  5. print ("\n")
  6. time.sleep(2)
  7. print ("Question one: What is the top cat breed as of now?")
  8. print ("--------------------------------------------------")
  9. time.sleep(.5)
  10. print ("A. Tabby")
  11. time.sleep(.5)
  12. print ("B. Bengal")
  13. time.sleep(.5)
  14. print ("C. Siamese")
  15. print ("--------------------------------------------------")
  16. print ("")
  17. ch1 = input()
  18.  
  19. if ch1 == ("B") or ch1 == ("b"):
  20.     print ("")
  21.     print ("Correct answer!")
  22. else:
  23.     print ("")
  24.     print (ch1,"is incorrect!")
  25.     score = score -1
  26.  
  27. print ("\n")
  28. print ("Question two: Who is the US president as of now?")
  29. print ("--------------------------------------------------")
  30. time.sleep(.5)
  31. print ("A. Donald Trump")
  32. time.sleep(.5)
  33. print ("B. Kim Jong-un")
  34. time.sleep(.5)
  35. print ("C. Nixon")
  36. print ("--------------------------------------------------")
  37. print ("")
  38. ch2 = input()
  39.  
  40. if ch2 == ("A") or ch2 == ("a"):
  41.     print ("")
  42.     print ("Correct answer!")
  43. else:
  44.     print ("")
  45.     print (ch2,"is incorrect!")
  46.     score = score -1
  47.  
  48. print ("\n")
  49. print ("Question three: Who is Kim Jong-un?")
  50. print ("--------------------------------------------------")
  51. time.sleep(.5)
  52. print ("A. Leader of North Korea")
  53. time.sleep(.5)
  54. print ("B. Leader of America")
  55. time.sleep(.5)
  56. print ("C. Leader of South Korea")
  57. print ("--------------------------------------------------")
  58. print ("")
  59. ch3 = input()
  60.  
  61. if ch3 == ("A") or ch3 == ("a"):
  62.     print ("")
  63.     print ("Correct answer!")
  64. else:
  65.     print ("")
  66.     print (ch3,"is incorrect!")
  67.     score = score -1
  68.    
  69. print ("\n")
  70. print ("Question four: What does he have lots of?")
  71. print ("--------------------------------------------------")
  72. time.sleep(.5)
  73. print ("A. Friends")
  74. time.sleep(.5)
  75. print ("B. Trees")
  76. time.sleep(.5)
  77. print ("C. Weapons")
  78. print ("--------------------------------------------------")
  79. print ("")
  80. ch4 = input()
  81.  
  82. if ch4 == ("C") or ch4 == ("c"):
  83.     print ("")
  84.     print ("Correct answer!")
  85. else:
  86.     print ("")
  87.     print (ch4,"is incorrect!")
  88.     score = score -1
  89.  
  90. print ("\n")
  91. print ("Question five: What is the name of NASA's mars rover?")
  92. print ("--------------------------------------------------")
  93. time.sleep(.5)
  94. print ("A. Discovery")
  95. time.sleep(.5)
  96. print ("B. Curiosity")
  97. time.sleep(.5)
  98. print ("C. Costar")
  99. print ("--------------------------------------------------")
  100. print ("")
  101. ch5 = input()
  102.  
  103. if ch5 == ("B") or ch5 == ("b"):
  104.     print ("")
  105.     print ("Correct answer!")
  106. else:
  107.     print ("")
  108.     print (ch5,"is incorrect!")
  109.     score = score -1
  110.  
  111. print ("\n")
  112. print ("Question six: What other ambition does NASA have now?")
  113. print ("--------------------------------------------------")
  114. time.sleep(.5)
  115. print ("A. Landing humans on mars")
  116. time.sleep(.5)
  117. print ("B. Landing humans into the sun")
  118. time.sleep(.5)
  119. print ("C. Landing humans on to the moon")
  120. print ("--------------------------------------------------")
  121. print ("")
  122. ch6 = input()
  123.  
  124. if ch6 == ("A") or ch6 == ("a"):
  125.     print ("")
  126.     print ("Correct answer!")
  127. else:
  128.     print ("")
  129.     print (ch6,"is incorrect!")
  130.     score = score -1
  131.  
  132. print ("\n")
  133. print ("Question seven: What is the UK's most popular pet?")
  134. print ("--------------------------------------------------")
  135. time.sleep(.5)
  136. print ("A. Hamsters")
  137. time.sleep(.5)
  138. print ("B. Cats")
  139. time.sleep(.5)
  140. print ("C. Fish")
  141. print ("--------------------------------------------------")
  142. print ("")
  143. ch7 = input()
  144.  
  145. if ch7 == ("C") or ch7 == ("c"):
  146.     print ("")
  147.     print ("Correct answer!")
  148. else:
  149.     print ("")
  150.     print (ch7,"is incorrect!")
  151.     score = score -1
  152.  
  153. print ("\n")
  154. print ("Question eight: What is the most popular TV show as of 2017?")
  155. print ("--------------------------------------------------")
  156. time.sleep(.5)
  157. print ("A. Doctor Who")
  158. time.sleep(.5)
  159. print ("B. Game of Thrones")
  160. time.sleep(.5)
  161. print ("C. Money for Nothing")
  162. print ("--------------------------------------------------")
  163. print ("")
  164. ch8 = input()
  165.  
  166. if ch8 == ("B") or ch8 == ("b"):
  167.     print ("")
  168.     print ("Correct answer!")
  169. else:
  170.     print ("")
  171.     print (ch8,"is incorrect!")
  172.     score = score -1
  173.  
  174. print ("\n")
  175. print ("Question nine: What was the name of the first Indiana Jones film?")
  176. print ("--------------------------------------------------")
  177. time.sleep(.5)
  178. print ("A. The Crystal Skull")
  179. time.sleep(.5)
  180. print ("B. Raiders Of The Lost Ark")
  181. time.sleep(.5)
  182. print ("C. The Holy Bacon Trail")
  183. print ("--------------------------------------------------")
  184. print ("")
  185. ch9 = input()
  186.  
  187. if ch9 == ("B") or ch9 == ("b"):
  188.     print ("")
  189.     print ("Correct answer!")
  190. else:
  191.     print ("")
  192.     print (ch9,"is incorrect!")
  193.     score = score -1
  194.  
  195. print ("\n")
  196. print ("Question ten: When was it released?")
  197. print ("--------------------------------------------------")
  198. time.sleep(.5)
  199. print ("A. 1988")
  200. time.sleep(.5)
  201. print ("B. 1978")
  202. time.sleep(.5)
  203. print ("C. 1981")
  204. print ("--------------------------------------------------")
  205. print ("")
  206. ch = input()
  207.  
  208. if ch == ("C") or ch == ("c"):
  209.     print ("")
  210.     print ("Correct answer!")
  211. else:
  212.     print ("")
  213.     print (ch,"is incorrect!")
  214.     score = score -1
  215.  
  216. print ("\n")
  217. print ("\n")
  218. print ("You have finished the ten questions!")
  219. print ("------------------------------------")
  220. print ("Score:",score,"/ 10")
  221. if score >= 0:
  222.     rank = ("Loser")
  223. if score >= 2:
  224.     rank = ("Pretty bad")
  225. if score >= 5:
  226.     rank = ("Not bad")
  227. if score == 8 or score == 9:
  228.     rank = ("Pretty good")
  229. if score == 10:
  230.     rank = ("Awesome")
  231.  
  232. print ("Rank:",rank)
  233. print ("------------------------------------")
  234. ent = input()
  235. exit()
Advertisement
Add Comment
Please, Sign In to add comment