num = 1

while num<=10:
print("number is", num**2)


it is correct why it display an error

Oops, try again. Make sure you print out all the numbers from 1 to 10 (inclusive).


Hello @yousef_yaht,
Your code wont work because your print line has errors, I think what you want is to make it write "number is 1" "number is 4" and so on, for that to work you need to use %s so it knows what to print. I don't know if you used %s already but if you haven't you'll get it explained later on in another chapter.

The only thing you have to change is the print line.

print("number is", num**2)


print "number is %s" % num ** 2

Your code will not be accepted as the instructions weren't followed. It tells you to just write out the numbers and nothing else.

Right code:

print num ** 2


This is the code mate.

num = 1

while num <= 10: # Fill in the condition
print num ** 2


That is exactly what I'm saying..

Look what I wrote - The only thing you have to change is the print line :wink:


I'm really new to this stuff but i forget. what does....+=.... mean?


Using "+=" is the same as saying "x = x + y"


for num in blank:
num = num + 2


for num in blank:
num += 2


whilst that works, you can also use:

num = 1

while num < 11:
print num**2
num = num + 1

yes its a little cheating, but it works