199,684 views
16 votes
16 votes
You have defined your player data type.class player:life = 3magic = Falsename = ''You created an instance of your player data type and assigned values.myPlayer = player()myPlayer.life = myPlayer.life - 1myPlayer.magic = TruemyPlayer.life = 4myPlayer.name = 'Kris'What will be the value displayed after this line of code?print(myPlayer.life)

User TrentP
by
2.6k points

1 Answer

19 votes
19 votes

Answer:4

Step-by-step explanation:

User JofoCodin
by
3.3k points