35 lines
588 B
Markdown
Raw Normal View History

---
id: 5e7b9f160b6c005b0e76f086
2020-04-21 23:37:02 -05:00
title: 'Objects: A Sample Class'
challengeType: 11
isHidden: true
isRequired: true
videoId: FiABKEuaSJ8
---
## Description
<section id='description'>
</section>
## Tests
<section id='tests'>
```yml
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
```
</section>