PYTHON CORE · LESSON 48
Your type of data
Class and object · about 13 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Take a small class and create an object.
class Dog:
name = "Рекс"
pet = Dog()
print(pet.name)Open the editor for class workSolve it yourself
Create a Cat class with the property name = «Мур». Create pet with Cat() and output pet.name.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework