0

Write a code with class

I have some problems with writing following program by python: Write a program to design a class that has the following information 1.Master's number 2.Teacher's name and surname 3.teaching The amount paid per hour Then, using this, write a program to provide the list of teacher with their salaries. Then teachers should be presented who have the same salary, and if their salaries are not the same, they should be leveled or grouped

8th Oct 2022, 9:25 PM
sara
2 Answers
+ 2
Post the link to your code attempt please
8th Oct 2022, 10:44 PM
Slick
Slick - avatar
0
i dont know how to write this part: (Then teachers should be presented who have the same salary, and if their salaries are not the same, they should be leveled or grouped) and here is my code class user: def __init__(self,teachername="undefiend",teacherfamily="undefiend",teachersalary=0): self.un1=teachername self.uf1=teacherfamily self.ua1=teachersalary def showinfo(self) : return f" {self.un1}{self.uf1}{self.ua1 }" tt=user("sara","alae",30000) hhh=user("jack","parkor",300000) gg=user("mikel","ebel",20000) ff=user("daya","eskafi",10000) print(tt.showinfo()) print(hhh.showinfo()) print(gg.showinfo()) print(ff.showinfo())
9th Oct 2022, 7:15 AM
sara