What is wrong with my code? It is in python and is a simple program where you input a word to cause then text to be outputted | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is wrong with my code? It is in python and is a simple program where you input a word to cause then text to be outputted

while True: yo_mama=("your mama is ") print("type an insult example:fat,dumb,short or quit if you want to quit") User_Input=input(": ") if User_Input== "quit" or "Quit": print("program ended") break elif User_Input== "fat " or "Fat ": insult=(" she calls her belt the equator") print(yo_mama+"so "+User_Input+insult) elif User_Input== "dumb " or "Dumb ": insult=(" she thought she could get a doctor's note from Dr Pepper") print(yo_mama+"so "+User_Input+insult)

21st Aug 2017, 3:40 PM
hunter dante
hunter dante - avatar
1 Answer
+ 1
when you do an or do you not need to put User_input == "Quit" (instead of just "Quit" although you could change User_input to be all lower case then you wont need an or at all.
21st Aug 2017, 4:37 PM
Enzo
Enzo - avatar