Created
February 10, 2017 14:38
-
-
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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