Showing
1 changed file
with
11 additions
and
1 deletions
1 | +def exit(word): | ||
2 | + if word == "exit": | ||
3 | + isTrue = False | ||
4 | + return isTrue | ||
5 | + else: | ||
6 | + return True | ||
7 | + | ||
8 | + | ||
1 | def echo(): | 9 | def echo(): |
2 | - while(True): | 10 | + isTrue = True |
11 | + while isTrue: | ||
3 | word = input("Enter the word: ") | 12 | word = input("Enter the word: ") |
13 | + isTrue = exit(word) | ||
4 | print(word) | 14 | print(word) |
5 | return | 15 | return |
6 | 16 | ... | ... |
-
Please register or login to post a comment