forked from wasahmed/Code_clinic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecondcommit.py
More file actions
40 lines (36 loc) · 1.42 KB
/
secondcommit.py
File metadata and controls
40 lines (36 loc) · 1.42 KB
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
#function to get user input and return in lowercase to avoid case sensitivity
def get_input():
user_input = input("Please enter response: ")
return user_input.lower()
# help function
def help_function():
"""
The function contains valid commands the user can follow to make a valid booking attempts
The function has evolved to be a function of understood commands
"""
while True:
user_input = get_input()
if user_input == 'help':
print(""" These are the commands you can use:
help - gives you commands you can use
doctor - to volunteer to be a tutor
patient - to get assistance from a tutor
make_slot - to confirm you are volunteering for the specified time
book_slot - to confirm you are choosing to get help at the specified time
choose_topic - to choose the topic you want to discuss during consultation
cancel_booking - to cancel a booking
cancel - to cancel an invalid action
""")
continue
if user_input == 'cancel':
#code to be added to take the necessary cancellation steps
print("Your action has been cancelled.")
continue
#to make testing barable
if user_input == 'off':
print("shutting down")
break
else:
continue
#function call
help_function()