Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON: Write a pay-raise program that requests a person's first name, last name and current annual salary, and then displays the person's salary for next

PYTHON:

Write a pay-raise program that requests a person's first name, last name and current annual salary, and then displays the person's salary for next year. People earning less than $40,000 will receive a 5% raise, and those earning $40,000 or more will receive a raise of $2,000 plus 2% of the amount over $40,000.

Use the following functions:

inputInfo() will accept the input and return the current salary.

calculateNewSalary(oldS) will return the salary increased by the raise

output(newS) will print the new salary

main() will call the functions (sending the needed parameters).

The statement main() should be aligned with the def statements.

main() will then run the "main function"

If the input is:

John

Smith

40000

Standard output exactly matches

Enter first name: John

Enter last name: Smith

Enter current salary: $40000

The new salary is $42000.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago