79221575

Date: 2024-11-25 03:47:12
Score: 0.5
Natty:
Report link

Here is an answer that is more similar to your code setup:

user_input = input()
splitstring = user_input.split()
while splitstring[0] != 'quit': # this will initiate the loop
    if splitstring == 'quit': # this will immediately quit the loop upon discovery of 'quit' in splitstring list position 0
        break # breaks the loop to quit
    else: # runs the loops until all input has been looped that does not include 'quit'
        print('Eating', splitstring[1], splitstring[0], 'a day keeps the doctor away.')
        user_input = input()
        splitstring = user_input.split()
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Taylor Paul Lilly