Created
July 30, 2020 22:19
-
-
Save cybnz/7fdaff522879770fb3403791d755b2b6 to your computer and use it in GitHub Desktop.
Checks for blanks but allows numbers
This file contains 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
# Get's recipe and checks it is not blank | |
# Not Blank Function goes here | |
def not_blank(question): | |
valid = False | |
while not valid: | |
response = input(question) | |
if response == "": | |
continue | |
else: | |
return response | |
# Main Routine goes here | |
recipe_name = not_blank("What is the recipe name? ") | |
print("You are making {}".format(recipe_name)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment