While you're at it (Python) While loops #3(Solved)


Hi. I just have a quick question about my python while loop. The instructions say to increment num, but I don't have any idea what it means. I thought it meant to return num, the variable, but that didn't let me pass.
Here is my code:

num = 1

while num < 11: # Fill in the condition
# Print num squared
print num ** 2
# Increment num (make sure to do this!)
return num


never mind... I solved it:
I added:
num = num + 1


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.