Jul-16-2018, 01:28 AM
I'm not sure why this program continues to print 'quit' when the user tells the program to quit. That last if statement is inside the while loop, it's supposed to check if the input is not equal to 'quit'. Even if it is equal to quit there is still an output. Reading through the code again, shouldn't it skip the while loop completely?
prompt = input("Tell me something, and I will repeat it back to you: ") prompt += "\nEnter 'quit' to end the program. " message = "" while message != 'quit': message = input(prompt) if message != 'quit': print(message)