2018-10-18.0

2018-10-18  本文已影响0人  Smr_T

class Student:

def __init__(self,name,age,language_score,math_score,english_score):
    self.name=name
    self.age=age
    self.language_score=language_score
    self.math_score=math_score
    self.english_score=english_score
def get_name(self):
    print(self.name)


def get_max_course(self):
    max_course=int(self.language_score)+int(self.math_score)+int(self.english_score)
    print(max_course/3)

p1=Student('xiaowang',18,50,50,50)
p1.get_name()
p1.get_max_course()

上一篇下一篇

猜你喜欢

热点阅读