* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
55 lines
467 B
Markdown
55 lines
467 B
Markdown
---
|
|
id: 5e7b9f160b6c005b0e76f086
|
|
title: 'Objects: A Sample Class'
|
|
challengeType: 11
|
|
videoId: FiABKEuaSJ8
|
|
dashedName: objects-a-sample-class
|
|
---
|
|
|
|
# --question--
|
|
|
|
## --text--
|
|
|
|
What will the following program print?:
|
|
|
|
```python
|
|
class PartyAnimal:
|
|
x = 0
|
|
def party(self):
|
|
self.x = self.x + 2
|
|
print(self.x)
|
|
|
|
an = PartyAnimal()
|
|
an.party()
|
|
an.party()
|
|
```
|
|
|
|
## --answers--
|
|
|
|
So far 1
|
|
|
|
So far 2
|
|
|
|
---
|
|
|
|
0
|
|
|
|
0
|
|
|
|
---
|
|
|
|
2
|
|
|
|
2
|
|
|
|
---
|
|
|
|
2
|
|
|
|
4
|
|
|
|
## --video-solution--
|
|
|
|
4
|
|
|