LearnPy Hub
← Inheritance & Special Methods problems
Medium

Manager Is an Employee

Employee(name, salary) has pay() = salary. Manager(Employee) adds a bonus and overrides pay() to salary + bonus. Read lines e name salary or m name salary bonus until END and print each name and pay, then the total payroll.

Input

Lines, then END.

Output

One line each, then the total.

Sample 1

Input
e Mim 30000
m Rafi 50000 10000
END
Output
Mim 30000
Rafi 60000
Total 90000

Sample 2

Input
e A 1
END
Output
A 1
Total 1
solution.py
Output appears here
Manager Is an Employee · Python practice problem · LearnPy Hub