-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.py
23 lines (18 loc) · 855 Bytes
/
travis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
known_users = ["Alice", "Bob", "Claire", "Dan", "Emma", "Fred", "Georgie", "Harry"]
while True:
print("Hi! My name is Travis")
name = input("What is your name?: ").strip().capitalize()
if name in known_users:
print("Hello {}!".format(name))
remove = input("Would you like to be removed from the system (y/n)?: ").strip().lower()
if remove == "y":
known_users.remove(name)
elif remove == "n":
print("No problem, I didn't want you to leave anyway!")
else:
print("Hmmm I don't think I have met you yet {}".format(name))
add_me = input("Would you like to be added to the system (y/n)?: ").strip().lower()
if add_me == "y":
known_users.append(name)
elif add_me == "n":
print("No worries, see you around!")