subject

I keep getting an infinite loop. Some help or hint would be greatly appreciated. Its a mad lib with loops. The loop has to stop when user inputs 'quit 0'. user_str = input()

stop = "quit 0"

while True:

s = user_str. split()[0]

n = int(user_str. split()[1])

if stop == "quit 0 ":

break

print(" Eating " + str(n) + " " + s + " a day keeps the doctor away.")

user_str = input()

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
question
Computers and Technology, 24.06.2019 10:30
This device directs network traffic. bridge hub nic repeater router switch
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
What process should be followed while giving a reference? sam has given a reference of his previous manager in his resume. sam should him in advance that the potential employers will him.
Answers: 1
question
Computers and Technology, 24.06.2019 21:40
Assume you need to test a function named inorder. the function inorder receives three int arguments and returns true if and only if the arguments are in non-decreasing order: that is, the second argument is not < the first and the third is not < the second. write the definition of driver function testinorder whose job it is to determine whether inorder is correct. so testinorder returns true if inorder is correct and returns false otherwise. for the purposes of this exercise, assume inorder is an expensive function call, so call it as few times as possible!
Answers: 1
You know the right answer?
I keep getting an infinite loop. Some help or hint would be greatly appreciated. Its a mad lib with...
Questions
question
History, 29.11.2020 16:10
question
Mathematics, 29.11.2020 16:10
question
Chemistry, 29.11.2020 16:20
Questions on the website: 13722367