subject

Trying to get this code to work. But I keep getting an error for the break. It's a mad lib and it needs to quit when the user input 'quit 0'. Help or hint would be great. Thank you. user_input = input('Please enter a number and word:')

while True:

m = user_input. split()[0]
n = int(user_input. split()[1])

if m. lower() == "quit":
break
else:
print("Eating " + str(n) + " " + m + " a day keeps the doctor away.")
user_input = input()

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:10
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
What allows you to create a wireless connection among your smart devices
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
You know the right answer?
Trying to get this code to work. But I keep getting an error for the break. It's a mad lib and it ne...
Questions
question
Mathematics, 07.01.2021 22:10
question
English, 07.01.2021 22:10
question
Mathematics, 07.01.2021 22:10
question
Mathematics, 07.01.2021 22:10
Questions on the website: 13722359