美文网首页
2018-10-18.0

2018-10-18.0

作者: Smr_T | 来源:发表于2018-10-18 20:17 被阅读0次

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()

相关文章

  • 2018-10-18.0

    class Student: p1=Student('xiaowang',18,50,50,50)p1.get_n...

网友评论

      本文标题:2018-10-18.0

      本文链接:https://www.haomeiwen.com/subject/rvoszftx.html