In: Computer Science
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.
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:
