Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Salary 1: Salary of $117.23 per day for 10 days. Salary 2: Salary will be calculated as follows: first day: $1.15, second day: $2.30, third

Salary 1: Salary of $117.23 per day for 10 days.

Salary 2: Salary will be calculated as follows: first day: $1.15, second day: $2.30, third day: $4.60, and so on, with the amount doubling each day up to the 10th day.

In order to make the best choice, you decide to program to help you determine which of the two salaries will give you more money.

Create the following functions:

1.a function called main to hold the inputs, outputs, and pass them when needed

2.a function to calculate salary 1 and pass the total for comparison

3.a function to calculate salary 2 and pass the total for comparison

4.a function to perform salary [total] comparisons and pass the best choice to the display function.

5.The display function will display and pass the best salary choice to main for storage

6.The main function will call the print function to print the result (best salary choice).

1.If salary 1 is higher than salary 2 or vice versa, your output should display salary 1 in amount of $__formatted in two decimal spaces. Use the necessary relational operator instead of the words greater than or less than.

def calculate_salary1():

salary1 = 117.23*10

return salary1

def calculate_salary2():

salary2 = 1.15*(2**10 - 1) / ( 2 - 1 )

return salary2

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_2

Step: 3

blur-text-image_3

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions