*Walmart: Hourly pay at 45 dollars per hour. They only work 30 weeks out of the year and work 80 hours per week, plus a one time 5,000 dollar signing bonus Your friend heard coding is useful and tried to code below but wasn't lucky enough to take CMSE201, so they only use python as a calculator rather than creating a function. Below is their code: #Friend's code #General Mills pay_gm = 100000 #CocaCola pay_ce 60*50*40 #Walmart pay_wlmrt = 45*30*80 + 5000 [100000, 120000, 113000] Your friend texts you just now mentioning they're on a 5 minute break from an interview and are about to negotiate their pay for another job offer at Starbucks Corporate. They don't have time to write out the math like above and would like an easy tool they can use on the fly that quickly calculates their take-home pay at the end of the year.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Python
Imagine your best friend just graduated and is now on the job hunt. They currently have 3 job offers with different benefits and are going to be interviewing for
more. Congratulations! Here are their three offers:
*General Mills: Salary pay for 100,000 dollars per year
"Coca Cola: Hourly pay at 60 dollars per hour. They work 50 weeks out of the year and work 40 hours per week
*Walmart: Hourly pay at 45 dollars per hour. They only work 30 weeks out of the year and work 80 hours per week, plus a one time 5,000 dollar signing bonus
Your friend heard coding is useful and tried to code below but wasn't lucky enough to take CMSE201, so they only use python as a calculator rather than
creating a function. Below
their code:
]: #Friend's code
#General Mills
pay_gm = 100000
#CocaCola
pay_cc = 60*50*40
#Walmart
pay_wlmrt = 45*30*80 + 5000
[100000, 120000, 113000]
Your friend texts you just now mentioning they're on a 5 minute break from an interview and are about to negotiate their pay for another job offer at Starbucks
Corporate. They don't have time to write out the math like above and would like an easy tool they can use on the fly that quickly calculates their take-home pay
at the end of the year.
V Write a function that calculates their yearly take home pay accepting any of the 3 forms from above: salary, weekly payment, or weekly payment with
signing bonus.
TIP: one of the inputs to the function should be the method of calculation; if method=' salary' then it should execute the salary type of calculation and so on.
Run your new function and print out the total pay from each job offer.
Transcribed Image Text:Imagine your best friend just graduated and is now on the job hunt. They currently have 3 job offers with different benefits and are going to be interviewing for more. Congratulations! Here are their three offers: *General Mills: Salary pay for 100,000 dollars per year "Coca Cola: Hourly pay at 60 dollars per hour. They work 50 weeks out of the year and work 40 hours per week *Walmart: Hourly pay at 45 dollars per hour. They only work 30 weeks out of the year and work 80 hours per week, plus a one time 5,000 dollar signing bonus Your friend heard coding is useful and tried to code below but wasn't lucky enough to take CMSE201, so they only use python as a calculator rather than creating a function. Below their code: ]: #Friend's code #General Mills pay_gm = 100000 #CocaCola pay_cc = 60*50*40 #Walmart pay_wlmrt = 45*30*80 + 5000 [100000, 120000, 113000] Your friend texts you just now mentioning they're on a 5 minute break from an interview and are about to negotiate their pay for another job offer at Starbucks Corporate. They don't have time to write out the math like above and would like an easy tool they can use on the fly that quickly calculates their take-home pay at the end of the year. V Write a function that calculates their yearly take home pay accepting any of the 3 forms from above: salary, weekly payment, or weekly payment with signing bonus. TIP: one of the inputs to the function should be the method of calculation; if method=' salary' then it should execute the salary type of calculation and so on. Run your new function and print out the total pay from each job offer.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY