ACTIVITY 10 / 50
Try as many times as you needPowers and area
Let’s understand
The ** operator raises a number to a power. 3 ** 2 means 3 multiplied by 3. A square’s area is its side length squared. ** and * perform different operations.
Listen to the explanation
Example
print(3 ** 2)A square garden bed has sides of 5 metres. Print its area using **.
I need a hint
Squaring a number means raising it to power 2.
How to find an error
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль