1.1k views
3 votes
Question #6

ent
Fill in the Blank
You have defined your player data type.
class player:
life = 3
magic = False
name = "
You created an instance of your player data type and assigned values.
myPlayer = player()
myPlayer.life = myPlayer.life - 1
myPlayer.life = 4
myPlayer.magic = True
myPlayer.name = 'Kris'
What will be the value displayed after this line of code?
print(myPlayer.life)
You will see

1 Answer

4 votes

Answer:

The answer is 4

Proof

Question #6 ent Fill in the Blank You have defined your player data type. class player-example-1
User Hoang Pham
by
4.7k points