While you're at it
while loop, you can do anything you could do elsewhere, including arithmetic operations.
while loop that prints out all the numbers from 1 to 10 squared (1, 4, 9, 16, … , 100), each on their own line.
- Fill in the blank space so that our
whileloop goes from
- Inside the loop, print the value of
numsquared. The syntax for squaring a number is
num ** 2.