Skip to content
Quiz · Classes · lesson 6 of 11

Quiz — class and instance attributes

What does the program print?

Python
class Dog:
    sound = "woof"


a = Dog()
b = Dog()
a.sound = "grr"
Dog.sound = "bark"
print(a.sound, b.sound)

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way