*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.
*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...
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fcd231e7c-1205-4713-840d-a358dcecb9c9%2F05e52472-996d-43a7-a165-a65becfd980f%2F1kyw0db_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY