5 Functions [10 marks]

Create a function that performs the following steps:

  1. Starts with the input variable value address which is the street address of the function user’s house
  2. Doubles the value from Step 1.
  3. Adds 42 to the result from Step 2.
  4. Multiplies the result from Step 3 by 50
  5. Subtracts the value of the input variable birthYear from the result from Step 4; birthYear is the year of birth of the function user
  6. Subtracts 50 from the result from Step 5
  7. Adds the value of the input variable numBirthdays to the result from Step 6; numBirthdays is the number of birthdays that the function user has had this year (i.e., either 0 or 1)
  8. Subtracts 31 from the result from Step 7
  9. Computes the value last which is equal to the last two digits from Step 8; for example, if the value in Step 8 is 97218 then last is 18
  10. Computes the value first which is equal to removing the last two digits from Step 8; for example, if the value in Step 8 is 97218 then first is 972

Your function should satisfy the following constraints:

  1. it should be named addressAndAge
  2. it should return two values first and last (see Steps 9 and 10 above for details)
  3. it should have three input values address, birthYear, and numBirthdays (the street address, year of birth, and number of birthdays that the user has had this year)

Your function must execute the steps as described above to compute the values first and last.