Commit 877a1751 by BellCodeEditor

save project

parent f7583e0f
Showing with 4 additions and 4 deletions
class wang: class wang:#创建一个类
def __init__(self): def __init__(self):#创建一个方法
self.pugong=5 self.pugong=5#创建属性
self.e=10 self.e=10
self.t=66 self.t=66
xiao = wang() xiao = wang()#实例化对象
print(xiao.e) print(xiao.e)
print(xiao.t) print(xiao.t)
print(xiao.pugong) print(xiao.pugong)
......
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