Question: Write a Python Program. Lab 10 Create a Python program that does all of the following: Declare a class named Employee Inside of it, define
Lab 10 Create a Python program that does all of the following: Declare a class named Employee Inside of it, define an nitmethod o The init method should accept and set values for 3 member variables, employee name, salary, and years of service Add another method to the class. Call the method pension o The pension method will calculate a monthly pension for the employee o The pension will = salary * years of service * 0015 o No arguments need to be passed to this method The method should return the calculated pension After you've defined your class, write the code for the program Do 3 input statements to get name, salary and years of service from the user Next, create an instance of the Employee class Next, call the pension method and print out the result When your program executes, it should look just like the example below Enter your name: Kelly James Enter your salary: 60000 How many years did you work? 25 Your monthly pension payout is $2,250.00 Be sure to upload your .py file to Blackboard
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
