Spam Thing in Python Cant stop | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
9th Feb 2022, 7:30 AM
PixelsAhead@YT
PixelsAhead@YT - avatar
2 Answers
+ 1
Inner while loop is infinite loop. Need a condition to stop loop but in while spam_stop < 60: if spam_stop < 60: print ("egg") #spam_stop <60 always true, cont get out of this.. Redundent check removed and here is Equal code : PixelsAhead@YT spam1000 = input() if spam1000 == "spamtrue": spam_stop = 0 while spam_stop < 60: spam_stop += 1 print ("egg") #else : #print("something")
9th Feb 2022, 9:55 AM
Jayakrishna 🇮🇳
0
Jay Matthews i did not understand….
9th Feb 2022, 8:47 AM
PixelsAhead@YT
PixelsAhead@YT - avatar