Commit 52aa6110 by BellCodeEditor

auto save

parent 02b7333e
Showing with 8 additions and 5 deletions
class Wanzi: class Wanzi:
def __init__(self): def __init__(self,name,hp,attack):
self.level=level self.level=1
self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
saniaoniuwan=Wanzi() saniaoniuwan=Wanzi("撒尿牛丸",0,0)
print(saniaoniuwan.hp) sanxianwanzi=Wanzi("三鲜丸子",250,0)
\ No newline at end of file print("撒尿牛丸的血量是",saniaoniuwan.hp)
print("三鲜丸子的血量是",sanxianwanzi.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