A couple things. Your two loops. <code> while 100: </code> will always loop and never break it is a true statement. It needs a point of reference. So you would say that while something is below or above or not equal to this integer, do the next steps. Your if statement is outside the previous loop. If the first loop were to execute as you would want, a would never equal twenty when the first loop decided to break. So I incorporated the if loop in the while loop to catch the number twenty. There are probably prettier ways of doing this. But here is my answer:
import console from random import random<p> a = 1 while a < 100: if a == 20: console.set_color(random(), random(), random()) else: console.set_color() print('hello '+str(a)) a += 1Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.