Add assigments folder

This commit is contained in:
Bastian committed 2020-01-16 11:13:01 +01:00
1 parent 338e22feef
commit 075c3aa044
2 files changed
-14

No files matched your search

File renamed without changes.
-14
View File
@@ -1,14 +0,0 @@
def ask_yes_no(prompt):
while True:
answer = input(prompt + ' (y or n) ')
if answer == 'y' or answer == 'Y':
return True # returning ends the function
if answer == 'n' or answer == 'N':
return False
print("Answer 'y' or 'n'.")
if ask_yes_no("Do you like ice cream?"):
print("You like ice cream!")
else:
print("You don't like ice cream.")