-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemployee.py
More file actions
36 lines (26 loc) · 882 Bytes
/
employee.py
File metadata and controls
36 lines (26 loc) · 882 Bytes
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
class Employee:
def __init__(self, inputName: str, inputAge: int, inputSalary: float):
self.name = inputName
self.age = inputAge
self.salary = inputSalary
def Work(self) -> None:
print(self.name + " is now working..\n")
return
def TimeOut(self) -> None:
print(self.name + " is now on a break..\n")
return
def PrintInfo(self) -> None:
print(self.name + " is " + str(self.age) + " years old and gets " + str(self.salary) + " per month :)\n")
return
def main() -> None:
constantinos = Employee("constantinos", 42, 1500.10)
katerina = Employee("katerina", 32, 2400.50)
print("\n")
katerina.PrintInfo()
constantinos.PrintInfo()
katerina.Work()
constantinos.TimeOut()
constantinos.Work()
katerina.TimeOut()
if __name__ == "__main__":
main()