• API
• FAQ
• Tools
• Trends
• Archive
SHARE
TWEET

# quiz

a guest Nov 16th, 2012 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. flashcards = ["not False:True", "not True:False", "True or False:True",
2.     "True or True:True", "False or True:True", "False or False:False",
3.     "True and False:False", "True and True:True", "False and True:False",
4.     "False and False:False", "not (True or False):False", "not (True or True):False",
5.     "not (False or True):False", "not (False or False):True",
6.     "1 != 0:True", "1 != 1:False", "0 != 1:True", "0 != 0:False",
7.     "1 == 0:False", "1 == 1:True", "0 == 1:False", "0 == 0:True"]
8.
9. from random import shuffle
10.
11. def splitcards(flashcards):
12.     shuffle(flashcards)
13.     question_list = []
15.     for x in flashcards:
17.         question_list.append(statement)
20.
21. def quiz1(flashcards):
22.     count = int(input("How many questions would you like? \n>"))
25.     randq = 1
26. #since I'm already shuffling the list, I decided to just use the count for the list position.
27.     while count > 0:
28.                 questions = question_list[count]
29.                 ans = input(questions + "\n> ")