Create a function that returns the total of a meal including tip and tax. You should not tip on the tax.

You will be given the subtotal, the tax as a percentage and the tip as a percentage. Please round your result to two decimal places.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def calculate_total(subtotal, tax, tip):
	

Solutions:
def calculate_total(subtotal, tax, tip):
	return round(subtotal * (1 + tax / 100.0 + tip / 100.0), 2)


def calculate_total(subtotal, tax, tip):
	tax = tax / 100 * subtotal
	tip = tip / 100 * subtotal
	return round(subtotal + tax + tip, 2)


def calculate_total(subtotal, tax, tip):
	return float('{0:.2f}'.format(subtotal + subtotal * (tax + tip) / 100))


def calculate_total(subtotal, tax, tip):
	meal = subtotal * (1 + (tax + tip) / 100)
	return round(meal, 2)


def percentage(value, percent):
	return value * percent / 100

def calculate_total(subtotal, tax, tip):
	total = subtotal + percentage(subtotal, tax) + percentage(subtotal, tip)
	return round(total, 2)