Commit 0e3285e6 by BellCodeEditor

save project

parent 70850cf8
Showing with 10 additions and 0 deletions
class Heros:
def __init__(self,name,attack,hp):
self.name=name
self.level=1
self.attack=attack
self.hp=hp
wukong=Heros("悟空",36,500)
yase=Heros("亞瑟",36,500)
print(yase.name+"的hp:"+str(yase.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