ACTIVITY 8 / 50
Try as many times as you needFour data types
Let’s understand
int stores a whole number, float a number with a fractional part, str text, and bool True or False. Python uses a decimal point. type reveals the type of a value. Do not quote a number if you want to calculate with it.
Listen to the explanation
Example
distance = 2.5
print(type(distance))Create ready = True and print ready. Use a capital T.
I need a hint
True without quotes is a Boolean value.
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.
Мой профиль