Dive into the world of knowledge and get your queries resolved at IDNLearn.com. Our experts are available to provide in-depth and trustworthy answers to any questions you may have.

Please please help I don’t understand this please.

Please Please Help I Dont Understand This Please class=

Sagot :

Answer:

first the class declaration (the bit with class player)

then the object creation (myPlayer = player())

then assigning a value to a property (myPlayer.life=4)

Explanation:

You have to declare the class before you can use it.

You have to create an object before you can access its members.

Unclear why in the exercise second and first are swapped...?