Files
freeCodeCamp/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.english.md
Oliver Eyton-Williams bd68b70f3d Feat: hide blocks not challenges (#39504)
* fix: remove isHidden flag from frontmatter

* fix: add isUpcomingChange

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

* feat: hide blocks not challenges

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
2020-09-03 15:07:40 -07:00

53 lines
651 B
Markdown

---
id: 5e7b9f160b6c005b0e76f086
title: 'Objects: A Sample Class'
challengeType: 11
isRequired: true
videoId: FiABKEuaSJ8
---
## Description
<section id='description'>
</section>
## Tests
<section id='tests'>
```yml
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
solution: 4
```
</section>