Commit b98cf65d by BellCodeEditor

save project

parent dcc467cb
Showing with 11 additions and 10 deletions
class Hero_1: class Hero:
def __init__(self): def __init__(self,name,shengming,gongji):
self.dj = 1 self.dj = 1
self.shm = 300 self.mz = name
self.gj = 20 self.shm = shengming
self.gj = gongji
yase = Hero("亚瑟",300,20)
yase = Hero_1() huoqubing = Hero("霍去病",100,250)
print(yase.shm) xiangyu = Hero("项羽",200,150)
\ No newline at end of file print(huoqubing.shm)
\ 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