...

/

Quiz: Object-Oriented Programming in Python

Quiz: Object-Oriented Programming in Python

Test what you've learned about object oriented programming with this fun quiz!

We'll cover the following...
Technical Quiz
1.

What will be the output of the following code?

class Animal:
    def __init__(self, name):
        self.name = name

    def speak(self):
        return "Some sound"

class Dog(Animal):
    def speak(self):
        return "Woof!"

dog = Dog("Buddy")
print(dog.speak())
A.

Some sound

B.

Woof!

C.

Buddy

D.

Error


1 / 6
...