You have an award-winning garden and everyday the plants need exactly 40mm of water. You created a great piece of JavaScript to calculate the amount of water your plants will need when you have taken into consideration the amount of rain water that is forecast for the day. Your jealous neighbour hacked your computer and filled your code with bugs. 

Your task is to debug the code before your plants die!

Difficulty: EASY
Starter code: def rain_amount(mm):
	

Solutions:
def rain_amount(mm):
	if mm < 40:
		return 'You need to give your plant ' + str(40 - mm) + 'mm of water'
	else:
		return 'Your plant has had more than enough water for today!'


rain_amount = lambda m: ['Your plant has had more than enough water for today!', 'You need to give your plant {}mm of water'][m < 40].format(40 - m)


def rain_amount(mm: int) -> str:
	return {mm < 40: f'You need to give your plant {40 - mm}mm of water'}.get(True, f'Your plant has had more than enough water for today!')


rain_amount = lambda n: n < 40 and 'You need to give your plant ' + str(40 - n) + 'mm of water' or 'Your plant has had more than enough water for today!'


rain_amount = lambda mm: f'You need to give your plant {40 - mm}mm of water' if mm < 40 else 'Your plant has had more than enough water for today!'


def rain_amount(mm):
	if mm > 39:
		return 'Your plant has had more than enough water for today!'
	return f'You need to give your plant {40 - mm}mm of water'


def rain_amount(mm):
	if mm >= 40:
		return 'Your plant has had more than enough water for today!'
	return 'You need to give your plant {0}mm of water'.format(40 - mm)


def rain_amount(mm):
	if mm >= 40:
		return 'Your plant has had more than enough water for today!'
	if mm is not 40:
		remaining = 40 - int(mm)
		return 'You need to give your plant {}mm of water'.format(remaining)


def rain_amount(mm):
	return ('Your plant has had more than enough water for today!', 'You need to give your plant %dmm of water' % (40 - mm))[mm < 40]