-
Notifications
You must be signed in to change notification settings - Fork 0
/
Quiz.py
37 lines (33 loc) · 860 Bytes
/
Quiz.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
print("Welcome to the Quiz!")
play = input("Do want to play? ")
score = 0
if play.lower() != "yes":
quit()
else:
print("Let's start :) ")
answer = input("What is a stack? ")
if answer.lower() == "linear data structure":
print("correct!")
score += 1
else:
print('Incorrect!')
answer = input("What is PSU? ")
if answer.lower() == "power supply unit":
print("correct!")
score += 1
else:
print('Incorrect!')
answer = input("what is sql? ")
if answer.lower() == "structured query language":
print("correct!")
score += 1
else:
print('Incorrect!')
answer = input("what does 26L of the A stand for? ")
if answer.lower() == "26 letters of the alphabet":
print("correct!")
score += 1
else:
print('Incorrect!')
print("Your total score is " +str(score))
print("You got "+str((score/4) * 100) +"%")