-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lesson_16.py
56 lines (31 loc) · 1.3 KB
/
Lesson_16.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class Employee:
def __init__(self, name, second_name, mobile_number, email, payment_per_one_day):
self.name = name
self.second_name = second_name
self.mobile_number = mobile_number
self.email = email
self.payment_per_one_day = payment_per_one_day
@staticmethod
def work(self):
print("I come to the office")
def payment_diff(Recruiter_payment, Programmer_payment):
return max(Recruiter_payment, Programmer_payment)
def check_salary(self, work_days, payment_per_one_day, no_payment_days):
self.day = work_days
self.payment_per_one_day = payment_per_one_day
self.no_payment_days = no_payment_days
return (work_days - no_payment_days) * payment_per_one_day
class Recruiter(Employee):
hired_this_month = 0
def work(self):
return "I come to the office and start hiring"
def __str__(self):
return f"Должность:{self.name} {self.second_name}"
class Programmer(Employee):
tech_stack = ""
closed_this_month = 0
def work(self):
return "I come to the office and start coding"
def __str__(self):
return f"Должность:{self.name} {self.second_name}"
prog = Programmer("Roma", "Momot", 33456, "[email protected]", 50.00)