ACTIVITY 39 / 50
Try as many times as you needA robot blueprint
Let’s understand
A class describes a new kind of object. It can combine data and actions. class starts the definition; class names usually start with a capital letter. pass marks a block left empty for now.
Listen to the explanation
Example
class Sensor:
passCreate an empty Robot class, then print Blueprint ready.
I need a hint
Put an indented pass after class Robot:.
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.
Мой профиль