-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewquiz.py
More file actions
60 lines (37 loc) · 1.55 KB
/
newquiz.py
File metadata and controls
60 lines (37 loc) · 1.55 KB
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
print ("welcome to my program")
playing = input("wanna play a quiz? ")
if playing.lower() != "yes": # if playing doesnt equal "yes" the program will close itself after printing a message
print ("Ok, see ya later mate")
quit()
print ("lets play then")
print ("which one is the capital city of the UK? ")
print ("a) Berlin")
print ("b) London")
print ("c) Gujrat")
answer = input () # this line is the moment in which the user is expected to write some input for the software to work with
if answer.lower() == "b":
print ("You're right, obviously")
else: # if the answer doesnt equal "b" the program will print a small text and close itself.
print ("Incorrect")
quit()
print ("which one is the capital city of France? ")
print ("a) Birmingham")
print ("b) London")
print ("c) Paris")
answer = input ()
if answer.lower() == "c":
print ("You're right, obviously")
else:
print ("You're wrong, but sometimes is okay")
quit ()
# this quiz has been made in Manchester
print ("which one is the capital city of Belgium? ")
print ("a) Brussels")
print ("b) New York")
print ("c) Moscow")
answer = input ()
if answer.lower() == "a": # the .lower() filters the users input and makes it all lowercase even if the user typed it in uppercase of both but the answer still needs to be right
print ("You're right, well done!")
else:
print ("You're wrong, get out") # I like cakes
quit()