Commit 9e406c6f by BellCodeEditor

save project

parent 4518cf89
Showing with 11 additions and 2 deletions
......@@ -4,4 +4,4 @@ class Hero:
case.hp=300
case.attack=20
yase=Hero()
print(yase.level())
\ No newline at end of file
print(yase.level)
\ No newline at end of file
class Hero:
def __init__(self,name,level,hp,acttack):
self.name=name
self.level=level
self.hp=hp
self.acttack=acttack
yase=Hero("亚瑟",1,300,20)
tiny=Hero("颜廷宇是一个傻叉",0,1,-30)
print(tiny.name)
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