________________________________________________________________________________
ID: 3855817 • Letter: #
Question
___________________________________________________________________________________________________________________
Add a file called retirement_main.py to this project. This is the main module. Write code in the main method as follows:
Ask the user to enter name, salary and years of service of two employees.
Create two instances of Employee, using the information obtained from the user. (what do they mean by creating two instances of employee?)
the ouput should look like this
________________________________________________________________
Enter name: Joe Chen
Enter salary: 80000
Enter years of service: 30
Monthly pension payout: 3600.0
Enter name: Jean Parks
Enter salary: 60000
Enter years of service: 25
Monthly pension payout: 2250.0
________________________________________________________________
Call the pension method of these two objects to calculate pensions.
Display the pensions.
_______________________________________________________________________________
Explanation / Answer
Hi,
I am providing the code below. It is heavily commented for deeper understanding. Comment if you found any difficulties in understanding any part of the code. Give a thumbs up if this answer helped you.
# code starts here
#code ends here
Hope it helps!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.