-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathditbenikook.py
175 lines (159 loc) · 3.92 KB
/
ditbenikook.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
import time # Imports a module to add a pause
# Figuring out how users might respond
answer_A = ["A", "a"]
answer_B = ["B", "b"]
answer_C = ["C", "c"]
yes = ["Y", "y", "yes"]
no = ["N", "n", "no"]
# Grabbing objects
decrease = "\nHelaas het is niet de goede antwoord. \n\njouw poin is vermindert 1 poin."
Good_answer = "Goeie Antwoord, volgende vraag"
required = "\nAlsjeblieft gebruik A,B,C\n" # Cutting down on duplication
point = 0
# The story is broken into sections, starting with "intro"
def intro():
print(
"Welkom bij de wereldgeschiedenis quiz, schrijf je naam en laten we beginnen. "
)
naam = input("Naam: ")
print(
naam
+ ", laten we beginnen met de eerst vraag: In welk jaartal was de onafhankelijkheid van de Verenigde Staten uitgeroepen?"
)
time.sleep(1)
print(
""" A.1784
B. 1783
C. 1782"""
)
choice = input(">>> ") # Here is your first choice.
global point
if choice in answer_A:
print(decrease)
point -= 1
option_president()
elif choice in answer_B:
print(Good_answer)
point -= 1
option_president()
elif choice in answer_C:
print(decrease)
point -= 1
option_president()
else:
print(required)
intro()
def option_president():
print("\nWelke generaal heeft ooit gezegd: 'Ik kom terug'?")
time.sleep(1)
print(
""" A. Douglas MacArthur
B. George Patton
C. Omar Bradley"""
)
global point
choice = input(">>> ")
if choice in answer_A:
print(Good_answer)
point += 1
option_war()
elif choice in answer_B:
print(decrease)
point -= 1
option_war()
elif choice in answer_C:
print(decrease)
point -= 1
option_war()
else:
print(required)
option_war()
def option_war():
print("\nJij bent er bijna, Wie was de zoon van Pepijn de Korte? ")
print(
""" A. Karel de Grote (en Carloman)
B. Theseus
C. Tito"""
)
choice = input(">>> ")
global point
if choice in answer_A:
print(Good_answer)
point += 1
option_nasa()
elif choice in answer_B:
print(decrease)
point -= 1
option_nasa()
elif choice in answer_C:
print(decrease)
point -= 1
option_nasa()
else:
print(required)
option_nasa()
def option_nasa():
print("\nHoe werd Ho Chi Minh Stad in Vietnam genoemd voor 1976? ")
time.sleep(1)
print(
""" A. Lutetia
B. Shinto
C. Saigon"""
)
choice = input(">>> ")
global point
if choice in answer_A:
print(decrease)
point -= 1
option_paus()
elif choice in answer_B:
print(decrease)
point -= 1
option_paus()
elif choice in answer_C:
print(Good_answer)
point += 1
option_paus()
else:
print(required)
option_paus()
def option_paus():
print(
"\nWas Urbanus II de paus die in 1095 de gelovigen opriep om op kruistocht te vertrekken om Jeruzalem te gaan bevrijden? Y of N: "
)
time.sleep(1)
choice = input(">>> ")
global point
if choice in yes:
print(Good_answer)
point += 1
option_town()
elif choice in no:
print(decrease)
point -= 1
option_town()
else:
print(required)
option_town()
def option_town():
print(
"\nLaatste vraag: Is Parthenon gebouw in Athene die door een Venetiaanse kanonskogel in de 17e eeuw verwoest? Y of N: "
)
choice = input(">>> ")
global point
if choice in yes:
print(Good_answer)
point += 1
elif choice in no:
print(decrease)
point -= 1
else:
print(required)
option_town()
def score():
global point
print("Your point is " + (str(point)))
print("Thanks for playing")
quit()
intro()
score()