ACTIVITY 11 / 50
Try as many times as you needThe program asks
Let’s understand
input reads one line from the input box. Even a typed digit starts as text. int converts a whole-number string to a number; use float for decimals. Enter input values in the panel on the right before running, one per line.
Listen to the explanation
Example
count = int(input())
print(count * 2)Read a number with int(input()), add 2 and print the result. Input 5 should produce 7.
I need a hint
Save the number in a variable, then calculate with it.
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.
Мой профиль