Commit 6cae1a78 by BellCodeEditor

auto save

parent 500ef73b
Showing with 21 additions and 0 deletions
class student:
def __init__(self,name,grade,chinese,math,english):
self.name=name
self.grade=grade
self.chinese=chinese
self.math=math
self.english=english
def a(self):
b=self.chinese+self.math+self.english
return b
gwx=student("郭文学",6,95,96,97)
count=gwx.a()
print(count)
print('名字',gwx.name)
print('年级',gwx.grade)
print('语文',gwx.chinese)
print('数学',gwx.math)
print('英语',gwx.english)
\ 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