Python to save your soul

In a previous post, I showed you how Python can let you print important things over and over again. Here I’m posting a video that just might save your soul with the code for the quiz at the bottom of the post:

from random import randint
import sys

questions = {1 : [“Joel is a hell-bound heretic.”, “true”],
2: [“GrEEK is awesome.”, “false”],
3: [“John Wesley was a Christian.”, “false”],
4: [“GrEEK is lame.”, “true”],
5: [“Zwingli’s real name is Hurlrick Zwiggly.”, “true”],
6: [“The Orthodox are orthodox.”, “false”],
7: [“Luther started the reformation while inebriated.”, “true”],
8: [“Hebrew is awesome.”, “true”]}

while True:
question_number = randint(1, 8)
QA = questions.get(question_number)
inp = raw_input(QA[0] + ” True or False? “)
if inp.lower() == QA[1]:
print(‘yay! cool! you got it!’)
elif inp == “”:
break
else:
print(‘no! wrong! study to save your soul!’)

Comments: