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, 22.06.2019 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
Write a program that inserts the digits of an integer into an array in originalorderfollowed by reverse order. first, promptthe user to enter a positive integer(> 0). determine the number of digits of the integer. create a dynamically allocated integer arrayof a size twice the number of digits.now insert the digits in original order which will occupy half of the array. then, insert the digits in reverse order.finally, output thedigits in thearray.use at least two functions to organize your program.
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
question
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
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
Arts, 07.01.2021 21:20
question
Social Studies, 07.01.2021 21:20
question
Mathematics, 07.01.2021 21:20
question
Mathematics, 07.01.2021 21:20
question
Mathematics, 07.01.2021 21:20
question
Mathematics, 07.01.2021 21:20
question
Mathematics, 07.01.2021 21:20
question
Biology, 07.01.2021 21:20
question
Physics, 07.01.2021 21:20
Questions on the website: 13722367