Quiz

Test your understanding of the concepts explained in this chapter with this quiz!

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

What will be the output of the following code?

class Scores:
    def __init__(self, s1, s2):
      self.scores = s1 + s2
    def display(self, scores):
      print(scores)
 
x = Scores(5,10)
setattr(x, 'scores', x.scores+1)
x.display(x.scores)
A.

15

B.

6

C.

16

D.

Error


1 / 4