-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz_game.py
45 lines (36 loc) · 949 Bytes
/
quiz_game.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
print('Welcome to my random joke quiz!')
playing = input("Would you like to play? ")
if playing.lower() != "yes":
quit()
print("Awesome! Let's play!")
score = 0
# 1
answer = input("What do you call an intelligent bottle of water? ")
if answer.lower() == "smart water":
print("Correct!")
score += 1
else:
print("Incorrect!")
# 2
answer = input("What do you call an alligator in a vest? ")
if answer.lower() == "investigator":
print("Correct!")
score += 1
else:
print("Incorrect!")
# 3
answer = input("What do you call cheese that isn't yours? ")
if answer.lower() == "nacho cheese":
print("Correct!")
score += 1
else:
print("Incorrect!")
# 4
answer = input("What's a ghost's favorite fruit? ")
if answer.lower() == "booberries":
print("Correct!")
score += 1
else:
print("Incorrect!")
print("you got " + str(score) + " questions correct!")
print("you got " + str((score / 4) * 100) + "%.")