Commit 61e8aed9 by BellCodeEditor

save project

parent 0cd42a22
Showing with 8 additions and 5 deletions
...@@ -3,7 +3,10 @@ class Hero: ...@@ -3,7 +3,10 @@ class Hero:
self.level=1 self.level=1
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack= self.attack=attack
yase=Hero() yase=Hero('亚瑟'30020)
print('yase的血量值为:',yase.hp) yase=Hero('后羿'240023)
print('yase的攻击为:',yase.attack) print('亚瑟的血量值为:',yase.hp)
\ No newline at end of file print('后羿的血为:',houyi.hp)
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