ACTIVITY 7 / 50
Try as many times as you needNames for values
Let’s understand
A variable connects a name to a value. In energy = 7, the = sign means assign, not compare. print(energy) displays the value; print("energy") displays the word. A name must not start with a digit.
Listen to the explanation
Example
water = 4
print(water)Create energy with the value 12 and print it.
I need a hint
Assign first, then print the name without quotation marks.
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.
Мой профиль