Commit 356f6a53 by BellCodeEditor

save project

parent 01fb3ee3
Showing with 12 additions and 2 deletions
...@@ -9,4 +9,14 @@ kunkun2=Hero('kunkun2',250,23) ...@@ -9,4 +9,14 @@ kunkun2=Hero('kunkun2',250,23)
kunkun3=Hero('kunkun3',5600,199) kunkun3=Hero('kunkun3',5600,199)
print("kunkun1的攻击力:",kunkun1.attack) print("kunkun1的攻击力:",kunkun1.attack)
print("kunkun2的攻击力:",kunkun2.attack) print("kunkun2的攻击力:",kunkun2.attack)
print("kunkun3的攻击力:",kunkun3.attack) print("kunkun3的攻击力:",kunkun3.attack)
\ No newline at end of file
def upgrade():
kunkun1.level=kunkun1.level+1
kunkun1.hp=kunkun1.hp+50
kunkun1.attack=kunkun1.attack+10
upgrade()
upgrade()
print("kunkun1的攻击力:",kunkun1.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