This commit is contained in:
adii1823
2021-10-28 17:34:45 +05:30
parent 583ec6a898
commit 8b802c5c62
34 changed files with 332 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
flavors = ["pistachio", "malaga", "vanilla", "chocolate", "strawberry"]
prompt = "Choose your flavor: "
print(flavors)
while (choice := input(prompt)) not in flavors:
print(f"Sorry, '{choice}' is not a valid option.")
print(f"You chose '{choice}'.")