Commit edc23c5a by BellCodeEditor

save project

parent 721f137c
Showing with 17 additions and 8 deletions
...@@ -4,11 +4,14 @@ class Hero: ...@@ -4,11 +4,14 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def updata(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase=Hero('yase',300,20)
yase.updata()
yase.updata()
yase=Hero('yase',200,30) print(yase.level)
def updata(): print(yase.hp)
yase.level=yase.level+1 print(yase.attack)
yase.hp=yase.hp+50 \ No newline at end of file
yase.attack=40
\ No newline at end of file
class Student:
def__
self.nj=nj
self.bj=bj
self.pd=pd
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