572 B
572 B
id, title, challengeType, isRequired, videoId
id | title | challengeType | isRequired | videoId |
---|---|---|---|---|
5e7b9f160b6c005b0e76f086 | Objects: A Sample Class | 11 | true | FiABKEuaSJ8 |
Description
Tests
question:
text: 'What will the following program print:
<pre>class PartyAnimal:<br> x = 0<br><br> def party(self) :<br> self.x = self.x + 2<br> print(self.x)<br>
<br>
an = PartyAnimal()<br>
an.party()<br>
an.party()</pre>'
answers:
- 'So far 1<br>So far 2'
- '0<br>0'
- '2<br>2'
- '1<br>2'
solution: 4