Skip to content

Instantly share code, notes, and snippets.

@citrusui
Created February 10, 2017 14:38
Show Gist options
  • Save citrusui/9a9b48b5d094448f1609608ec7ba307c to your computer and use it in GitHub Desktop.
Save citrusui/9a9b48b5d094448f1609608ec7ba307c to your computer and use it in GitHub Desktop.
Show a custom greeting based on which user is currently logged in.
"""This shows a specific greeting based on who is logging in."""
name = None
def goinput():
"""Handle user auth."""
name = input("\nGood morning! Please enter your name: ").lower()
if name == "harris":
print("\nHello %s, great job." % (name))
elif name == "avery":
print("\nHi %s! You have no new notifications." % (name))
else:
print("%s" % (errormsg))
goinput()
errormsg = "\nCan't find that user. Please login as 'avery' or 'harris'."
goinput()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment