--- id: 5e7b9f160b6c005b0e76f086 title: 'Objects: A Sample Class' challengeType: 11 isRequired: true videoId: FiABKEuaSJ8 --- ## Description ## Tests ```yml question: text: 'What will the following program print: class PartyAnimal: x = 0 def party(self) : self.x = self.x + 2 print(self.x) an = PartyAnimal() an.party() an.party()' answers: - 'So far 1So far 2' - '00' - '22' - '12' solution: 4 ```
class PartyAnimal: x = 0 def party(self) : self.x = self.x + 2 print(self.x) an = PartyAnimal() an.party() an.party()