-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path17.car_game.py
More file actions
38 lines (34 loc) · 858 Bytes
/
17.car_game.py
File metadata and controls
38 lines (34 loc) · 858 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
# form = 1
# user_guess = 0
# max_guess = 3
user_input = ''
car_started = 0
car_stopped = 0
while user_input.lower() != 'quit':
user_input = input("> ").lower()
if user_input == "help":
print('''
start - to start the car
stop - to stop the car
quit - to exit
''')
elif user_input == "start":
if car_started < 1:
print("Car started...Ready to go!")
else:
print("Car already started... man")
car_started += 1
elif user_input == "stop":
if car_stopped < 1:
print("Car stopped.")
else:
print("Car already stopped... man")
car_stopped += 1
elif user_input == 'quit':
break
else:
print('''
I don't understand what you typed...
type 'help' for more
''')
# user_guess += 1