text to sql syntaxMon, 27 Mar 2023

let's build a class SinhVien with the attributes of students created by them come up with (must list at least 3 properties), in addition the class has 4 more properties about The scores are: theory score, practical score, midterm (exam) score and final (exam) score. Besides, when any student object has just been created, the initial value of the score columns are equal to 0 Then write a program that uses the above student class and has the functions data entry for students (enter values for attributes); calculate the average score of students members (20% theory + 20% practice + 20% midterm + 40% final) and information export of students on the screen. In addition, the program must have getter and setter methods to get and set the value for all member properties of the object.

class SinhVien: def __init__(self, ho_ten, nam_sinh, lop, diem_toan, diem_ly, diem_hoa, diem_thi_thuc_hanh, diem_thi_thuyet ): self.ho_ten = ho_ten self.nam_sinh = nam_sinh self.lop = lop self.diem_toan = diem_toan self.diem_ly = diem_ly self.diem_hoa = diem_hoa self.diem_thi_thuc_hanh = diem_thi_thuc_hanh self.diem_thi_thuyet = diem_thi_thuyet def get_ho_ten(self): return self.ho_ten def get_nam_sinh(self): return self.nam_sinh def get_lop(self): return

Questions about programming?Chat with your personal AI assistant