input: Write a python function to calculate tax based on yearly income and rate.
  assert calculatetax(70000, 0.2) == 14000
  assert calculatetax(50000, 0.15) == 7500
  assert calculatetax(100000, 0.25) == 25000
output: def calculatetax(yearly_income, rate):
      return yearly_income * rate