Answer to Question #154825 in Python for crystal

Question #154825
Please enter the next word: cat
#1: You entered cat
Please enter the next word: iguana
#2: You entered iguana
Please enter the next word: zebra
#3: You entered zebra
Please enter the next word: dolphin
#4: You entered dolphin
Please enter the next word: STOP
All done. 4 words entered.
1
Expert's answer
2021-01-11T05:02:11-0500
t = 0
while 1:
    word = input('Please enter the next word: ')
    if (word == "STOP"):
        break
    else: 
        print('You entered', word)
        t += 1;
result = "well done. {} words entered"
print(result.format(t))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS