Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- known_users = ["Alice","Bob","Clair","Dan","Emma","Fred","Georgia","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)?:")
- if remove == "y":
- known_users.remove(name)
- print("you are removed {}!".format(name))
- print("here is the list of users: {}".format(known_users))
- break
- else:
- print("Hmmm, I Dont Think I Have Met You Yet {}!".format(name))
- add_me = input("Would You Like To Be Added In The System(y/n)?!:").strip().lower()
- if add_me == "y":
- known_users.append(name)
- print("you are successfully added {}!".format(name))
- print("here is the list of users: {}".format(known_users))
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement