-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
31 lines (26 loc) · 653 Bytes
/
Copy pathgame.py
File metadata and controls
31 lines (26 loc) · 653 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
print("Welcome to my computer game")
playing = input("Do you want to play? ")
if playing.lower() != "yes":
quit()
print("Okay let's play")
score = 1
answer = input("What does CPU stand for? ")
if answer.lower() == "central processing unit":
print("correct")
score += 1
else:
print("incorrect")
answer = input("What is the capital city of Kenya? ")
if answer.lower() == "nairobi":
print("right")
score += 1
else:
print("wrong answer")
answer = input("Where is Kenya found? ")
if answer.lower() == "africa":
print("correct")
score += 1
else:
print("wrong")
print(score)
print("You got" + str(score) + "marks")