Files
freeCodeCamp/curriculum/challenges/japanese/23-python-for-everybody/python-for-everybody/objects-a-sample-class.md
freeCodeCamp's Camper Bot 9c20069eb2 chore(i18n,learn): processed translations (#53819)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2024-03-12 22:29:52 +05:30

613 B

id, title, challengeType, videoId, bilibiliIds, dashedName
id title challengeType videoId bilibiliIds dashedName
5e7b9f160b6c005b0e76f086 オブジェクト: サンプルクラス 11 FiABKEuaSJ8
aid bvid cid
589451777 BV1rq4y1X7TG 377523194
objects-a-sample-class

--question--

--text--

次のプログラムは何を出力しますか?

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