B Computer Coding Tutorials Volume 1

Python OOP Academy

🐍 Python OOP Academy

30-minútový kurz interaktívneho kódovania

XP: 0/500
20%

Lekcia 1 – Vytváranie tried

Trieda je plán pre objekt.

Príklad

class Dog:
    pass

Výzva: Vytvorte triedu s názvom Pes.

Lekcia 2 – Vytváranie objektov

Create an object named my_dog from the Dog class.

Lesson 3 – Constructors

Create an __init__ method with a name parameter.

Lesson 4 – Methods

Create a bark() method.

Lesson 5 – Inheritance

Create a Dog class that inherits from Animal.

🏆 Congratulations!

You completed the Python OOP Academy.

Topics Mastered:

  • Classes
  • Objects
  • Constructors
  • Attributes
  • Methods
  • Inheritance

Final Score: XP