-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcar_game.py
More file actions
33 lines (30 loc) · 959 Bytes
/
car_game.py
File metadata and controls
33 lines (30 loc) · 959 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
print('''Welcome to the Car Game
Start
Stop
Quit''')
var = input("what would you like to do? ").upper()
status = False
while len(var) >= 0:
if var == "START":
if status == False:
status = True
print("Car has started")
status = True
var = input("What would you like to do? ").upper()
else:
print("The car is already running")
var = input("What would you like to do? ").upper()
elif var == "STOP":
if status == True:
print("Car has stopped")
var = input("What would you like to do? ").upper()
status = False
else:
print("The car hasn't even started")
var = input("What would you like to do? ").upper()
elif var == "QUIT":
print("You just quit...")
break
else:
print("I dont understand this")
var = input("what would you like to do? ").upper()