Question OOP-CLS-0040
EasyWhat is the output of this code?
class Dog:
sound = "Woof"
d = Dog()
print(d.sound)
- A.
Woof
- B.
Error
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
What is the output of this code?
class Dog:
sound = "Woof"
d = Dog()
print(d.sound)
Woof
Error
Sign up free to see the answer and a step-by-step explanation.
sound
None