Question

In: Computer Science

Assume that front end developers make $54.63 per hour and back end developers make $62.39 per...

Assume that front end developers make $54.63 per hour and back end developers make $62.39 per hour. Write a function (calcWeeklyPay) that will accept a developer type (1 for front end, 2 for back end), and number of hours worked per week as parameters and return the developer's weekly pay amount.

Solutions

Expert Solution

Python Function:

def calcWeeklyPay(type, hrsWorked):
   """ Function that calculates weekly pay """
   # Checking type of developer
   if type == 1:
       # Multiplying number of hours with hourly pay
       return (hrsWorked * 54.63)
   elif type == 2:
       # Multiplying number of hours with hourly pay
       return (hrsWorked * 62.39)
   else:
       print("\nInvalid Developer Type...\n")
       return 0

_____________________________________________________________________________________

Sample Run:


Related Solutions

Write a JavaFx program to create Forms as front end and JDBC as back end to...
Write a JavaFx program to create Forms as front end and JDBC as back end to store the data and retrieve the data.
Front-end load VS Back-end load I asked the professor which one is better and she said...
Front-end load VS Back-end load I asked the professor which one is better and she said that it depends on your time horizon. So, which one is better for short-term and why?? And which one is better for long-term and why??
Assume you can produce 6 fish per hour or 5 baskets of berries per hour, and...
Assume you can produce 6 fish per hour or 5 baskets of berries per hour, and your neighbor can produce 5 fish per hour or 1 basket of berries per hour. 1) •Who has the absolute advantage in catching fish? In picking berries? How did you determine your answer? 2) •What is your opportunity cost of another fish? 3) •What is your neighbor’s opportunity cost of another fish? 4)•Who has a comparative advantage in catching fish? 5)•What is your opportunity...
a. Describe the following: front-end load, back-end load, level load, 12b-1 fee, management fee. b. Why...
a. Describe the following: front-end load, back-end load, level load, 12b-1 fee, management fee. b. Why do mutual funds have different classes of shares? c. What are the advantages of an ETF relative to open-end and closed-end investment companies?
Assume that Norman has an average of 4.2 traffic accidents per hour during rush hour periods....
Assume that Norman has an average of 4.2 traffic accidents per hour during rush hour periods. a. What is the probability that there are more than five accidents in a particular hour? b. If there are two hours worth of rush hour periods per day (one hour in the morning, one hour in the afternoon), what is the probability that there are between 45 and 48 accidents in a work week of five days?
Cars arrive at a parking lot at a rate of 20 per hour. Assume that a...
Cars arrive at a parking lot at a rate of 20 per hour. Assume that a Poisson process model is appropriate. Answer the following questions. No derivations are needed but justification of your answers are necessary. What assumptions are necessary to model the arrival of cars as a Poisson process? What is the expected number of cars that arrive between 10:00 a.m and 11:45 a. m? Suppose you walk into the parking lot at 10:15 a.m.; how long, on average,...
Suppose that customers arrive at a bank at a rate of 10 per hour. Assume that...
Suppose that customers arrive at a bank at a rate of 10 per hour. Assume that the number of customer arrivals X follows a Poisson distribution. A. Find the probability of more than 25 people arriving within the next two hours using the Poisson mass function. B. Find the probability of more than 25 people arriving within the next two hours using the normal approximation to the Poisson. C. Compute the percent relative difference between the exact probability computed in...
Hummingbirds randomly fly through my back yard at a rate of 5 hummingbirds per hour. Let...
Hummingbirds randomly fly through my back yard at a rate of 5 hummingbirds per hour. Let X = the number of hummingbirds who fly through my backyard during a randomly selected one-hour period. X may be modeled as a Poisson random variable with parameter λ = 5. Let Y equal the total number of hummingbirds who fly through my backyard during a randomly selected two-hour period. a. For our model, what is expected value of X? b. What is the...
assume the shadow cost is $52 per hour. For B7, assume allocated fixed costs of $1391...
assume the shadow cost is $52 per hour. For B7, assume allocated fixed costs of $1391 and variable costs of $13 per unit. B7 uses 0.13 hours of inspector time per unit and has a demand curve of V = 1000 - 28P. What is the optimal price to charge for B7? The answer must be rounded to cents
What are the ''Back Stage'' and ''Front Stage'' for personal shopper business
What are the ''Back Stage'' and ''Front Stage'' for personal shopper business
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT