-
Notifications
You must be signed in to change notification settings - Fork 0
/
1st Python Quiz
163 lines (114 loc) · 3.87 KB
/
1st Python Quiz
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
# trivia quiz
# this quiz tests your knowledge of world geography
# author: Mark
score = 0
score= int(score)
print("This quiz tests your knowledge of New York City Facts\n")
name = input("Enter your name: ")
print("\n Hi there", name)
print("I will ask you 10 questions and give you three choices for each question.\n")
print("Select the right choice from the options: A, B, C")
print("---------------")
# question 1
print("Question 1: What is the capital of New York State?")
print("A: New York City")
print("B: Syracuse")
print("C: Albany")
# varibles and if statement
Q1answer="C"
Q1response= input("Enter your answer: ")
if Q1response=="C" or Q1response=="c":
score=score+1
print("your current score is", score)
print("Well done", Q1response, "is correct")
elif Q1response !="C" or Q1response !="c":print("Wrong Answer")
print("---------------")
# question 2
print("Question 2: What is the largest park in New York City?")
print("A: Washington Square Park")
print("B: Battery Park")
print("C: Central Park")
# varibles and if statement
Q2answer="C"
Q2response= input("Enter your answer: ")
if Q2response=="C" or Q2response=="c":
score=score+1
print("your current score is", score)
print("Well done", Q2response, "is correct")
elif Q2response !="C" or Q2response !="c":print("Wrong Answer")
print("---------------")
# question 3
print("Question 3: What subway line ends at 96st?")
print("A: Q")
print("B: F")
print("C: E")
# varibles and if statement
Q3answer="A"
Q3response= input("Enter your answer: ")
if Q3response=="A" or Q3response=="a":
score=score+1
print("your current score is", score)
print("Well done", Q3response, "is correct")
elif Q3response !="A" or Q3response !="a":print("Wrong Answer")
print("---------------")
# question 4
print("Question 4: What is the tallest building in New York City?")
print("A: Empire State Building")
print("B: One World Trade Center")
print("C: Chrysler Building")
# varibles and if statement
Q4answer="B"
Q4response= input("Enter your answer: ")
if Q4response=="B" or Q4response=="b":
score=score+1
print("your current score is", score)
print("Well done", Q4response, "is correct")
elif Q4response !="B" or Q4response !="b":print("Wrong Answer")
print("---------------")
# question 5
print("Question 5: What island sits in the East River, between Manhattan and Queens?")
print("A: Roosevelt Island")
print("B: Randals Island")
print("C: Rikers Island")
# varibles and if statement
Q5answer="A"
Q5response= input("Enter your answer: ")
if Q5response=="A" or Q5response=="a":
score=score+1
print("your current score is", score)
print("Well done", Q5response, "is correct")
elif Q5response !="A" or Q5response !="a":print("Wrong Answer")
print("---------------")
# question 6
print("Question 6: What is the only aerial commuter system in North America?")
print("A: Ocean bridge")
print("B: Roosevelt Island Tramway")
print("C: Riverview Skybridge")
# varibles and if statement
Q6answer="B"
Q6response= input("Enter your answer: ")
if Q6response=="B" or Q6response=="b":
score=score+1
print("your current score is", score)
print("Well done", Q6response, "is correct")
elif Q6response !="B" or Q6response !="b":print("Wrong Answer")
print("---------------")
# question 7
print("Question 7: Largest retail store location in the Harold Square area?")
print("A: JC Penny")
print("B: Best Buy")
print("C: Macy's")
# varibles and if statement
Q7answer="C"
Q7response= input("Enter your answer: ")
if Q7response=="C" or Q7response=="c":
score=score+1
print("your current score is", score)
print("Well done", Q7response, "is correct")
elif Q7response !="C" or Q7response !="c":print("Wrong Answer")
print("---------------")
final_score= (score*1)
print("Your final score is", final_score)
if final_score==7:
print("Great Job you got a perfect score")
print("Thank you for taking my quiz")