Files
freeCodeCamp/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.md
Oliver Eyton-Williams 0bd52f8bd1 Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
2020-11-27 10:02:05 -08:00

54 lines
432 B
Markdown

---
id: 5e7b9f160b6c005b0e76f086
title: 'Objects: A Sample Class'
challengeType: 11
videoId: FiABKEuaSJ8
---
# --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