(Didn't mean to post the last bit.) Is this possibly what you meant? If it is I still can't figure out how to apply it to the guessthenumber program. numberofgames=1 while numberofgames<4: numberofgames=numberofgames+2 print (4-numberofgames) if numberofguesses>3: print(numberofgames)