def rain_amount(mm)

  # Use the ternary operator to simplify the if-statement
  (mm < 40) ? "You need to give your plant #{40 - mm}mm of water" : "Your plant has had more than enough water for today!"

end