-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomputer_trivia.py
More file actions
47 lines (33 loc) · 1015 Bytes
/
Copy pathcomputer_trivia.py
File metadata and controls
47 lines (33 loc) · 1015 Bytes
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
'''This is a programme that demonstrates a computer fun facts trivia game.'''
print("Welcome to Computer Quiz Game!")
playing = input("Do you want to play? ")
if playing != "yes":
quit()
print("Okay! Let's play :)")
score = 0
answer = input("Who is the father of Computer science? ")
if answer == "charles babbage":
print("Correct!")
score = score + 1
else:
print("Incorrect!")
answer = input("Which is the common name for the crime of stealing passwords? ")
if answer == "spoofing":
print("Correct!")
score = score + 1
else:
print("Incorrect!")
answer = input("What is the name of the first electronic computer? ")
if answer == "ENIAC":
print("Correct!")
score = score + 1
else:
print("Incorrect!")
answer = input("What does USB stand for? ")
if answer == "Universal Serial Bus":
print("Correct!")
score = score + 1
else:
print("Incorrect!")
print("You got " + str(score) + " questions correct!")
print("You scored " + str((score/4) * 100) + "%.")