We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22f732e commit 00e9eecCopy full SHA for 00e9eec
code/zach/lab08-dad-joke-api.py
@@ -25,9 +25,12 @@ def main():
25
while index < len(jokes) and answer == 'yes':
26
print(jokes[index])
27
index += 1
28
+
29
+ if index == len(jokes):
30
+ print("We are out of jokes.")
31
+ break
32
33
answer = input(f"Would you like to see another dad joke about '{user_input}'? Enter yes/no: ")
- #else:
- # print("We have run out of jokes on this topic.")
34
35
print("You're welcome. Byeeeee")
36
0 commit comments