Commit 2df8f951 by BellCodeEditor

save project

parent e36df30a
Showing with 16 additions and 5 deletions
class Haro: class Haro:
def__init__(salf,,attack,level) def__init__(salf,,attack,level)
salf. salf.level=1
salf. salf.name=name
salf. salf.hp=hp
salf. salf.attack=attack
\ No newline at end of file
def upcade()
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase=Hero("老八",300,20)
houyi=Hero("八勒比海盗"240,24)
print("老八的血量为:",yase.hp)
print("八勒比海盗的血量为:"houyi.hp)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment