Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
1bzz has 4 characters so it enters the loop. The first character from the right of the string is a 'z', so it is then changed to a 'c'. 1bzc is 4 characters so it enters the loop. All 'if's fail and the string becomes 1bzc*. Print because 1bzc* is greater than 4 characters and it does not go back in loop.
14th Jun 2019, 9:24 PM
Jackson O’Donnell