Using my code, the only numbers that get printed are 1,9, and 49. Then, I receive a message saying “Oops, try again. Make sure you print out all the numbers from 1 to 10 (inclusive)”. Please help. Thank you!
It would be great if somebody could help me figure out how to make the program square all the numbers from 1-10 using the while loop.
num = 1 while num <= 10: print num**2 num += num + 1