-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTravis.py
38 lines (33 loc) · 1.45 KB
/
Travis.py
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
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 25 21:53:48 2020
@author: Desktop
"""
known_users= ["Ratnaboli","Nandini","Rahul","Piyush","Vishakha",
"Rudrashish","Phalguni","James"]
while True:
print("Hi! My name is Travis")
name = input("What is your name?: ").strip().title()
if (name in known_users):
print ("Hello {}, nice to see you!".format(name))
remove = input("Would you liked to be removed from the system (Y/N)?: ").upper()
if remove =="Y":
print ("*******************************")
print (known_users)
print ("*******************************")
known_users.remove(name)
print("USER REMOVED SUCCESFULLY!")
print ("*******************************")
print (known_users)
print ("*******************************")
else:
new_user = input("Hey {} , I'm sorry but I couldn't recognize you ,would you like to be added to the list (Y/N)? :".format(name)).upper()
if (new_user == "Y"):
print ("*******************************")
print (known_users)
print ("*******************************")
known_users.append(name)
print ("Welcome {},NEW USER ADDED!!".format(name))
print ("*******************************")
print (known_users)
print ("*******************************")