Commit ac258d5a by BellCodeEditor

save project

parent 45d9f554
Showing with 5 additions and 4 deletions
......@@ -4,6 +4,7 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
xiaobei=Hero("xiaobei",300,30)
print("xiaobei的血量值为:",xiaobei.hp)
print("xiaobei的攻击力为:",xiaobei.attack)
\ No newline at end of file
xiaobei=Hero("小贝",300,30)
nuoyi=Hero("诺依",200,20)
print("小贝的血量值为:",xiaobei.hp)
print("诺依的攻击力为:",nuoyi.attack)
\ 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