Skip to content

Commit 00e9eec

Browse files
Zach - completed lab 8.
1 parent 22f732e commit 00e9eec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

code/zach/lab08-dad-joke-api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ def main():
2525
while index < len(jokes) and answer == 'yes':
2626
print(jokes[index])
2727
index += 1
28+
29+
if index == len(jokes):
30+
print("We are out of jokes.")
31+
break
32+
2833
answer = input(f"Would you like to see another dad joke about '{user_input}'? Enter yes/no: ")
29-
#else:
30-
# print("We have run out of jokes on this topic.")
3134

3235
print("You're welcome. Byeeeee")
3336

0 commit comments

Comments
 (0)