It's bonus time in the big city! The fatcats are rubbing their paws in anticipation... but who is going to make the most money? 

Build a function that takes in two arguments (salary, bonus). Salary will be an integer, and bonus a boolean.

If bonus is true, the salary should be multiplied by 10. If bonus is false, the fatcat did not make enough money and must receive only his stated salary.

Return the total figure the individual will receive as a string prefixed with "£" (= `"\u00A3"`, JS, Go, and Java), "$" (C#, C++, Ruby, Clojure, Elixir, PHP and Python, Haskell, Lua) or "¥" (Rust).

Source: codewars | Difficulty: EASY
Tags: String algorithms

Starter code: def bonus_time(salary, bonus):
	

Solutions:
def bonus_time(salary, bonus):
	return '${}'.format(salary * (10 if bonus else 1))


def bonus_time(salary, bonus):
	if bonus:
		return '$' + str(salary * 10)
	else:
		return '$' + str(salary)


def bonus_time(salary, bonus):
	return '$' + str(salary * [1, 10][bonus])


def bonus_time(salary, bonus):
	return f'${(salary * 10 if bonus else salary)}'


def bonus_time(salary, bonus):
	return '${}'.format(salary * (1 + 9 * bonus))


def bonus_time(salary, bonus):
	return '$%d' % (salary * 10 if bonus else salary)


def bonus_time(salary, bonus):
	if bonus:
		salary = salary * 10
	return str.format('${0}', salary)


bonus_time = lambda salary, bonus: '${}'.format(salary * 10 if bonus else salary)


def bonus_time(salary, bonus):
	return '${0}{1}'.format(salary, '0' if bonus else '')


def bonus_time(salary, bonus):
	return '${}'.format([salary, salary * 10][bonus])


bonus_time = lambda s, b: '${}'.format(s * (10 * b or 1))


def bonus_time(salary, bonus):
	return '${0}'.format(salary * 10 if bonus else salary)


def bonus_time(salary, bonus):
	salary = int(salary)
	bonus = bool(bonus)
	if bonus is True:
		salary = salary * 10
	return '${}'.format(salary)


def bonus_time(salary, bonus):
	if bonus == True:
		salary = salary * 10
	return '$' + str(salary)


def bonus_time(salary, bonus):
	return '$%d' % (salary * 10 ** bonus)


def bonus_time(salary, bonus):
	return '$%s%s' % (salary, '0' * bonus)


def bonus_time(salary, bonus):
	return ('$%d', '$%d0')[bonus] % salary


def bonus_time(salary, bonus):
	return '$' + str(salary * 10 ** int(bonus))


def bonus_time(salary, bonus):
	return '$%d' % (salary * (bonus * 9 + 1))


def bonus_time(salary, bonus):
	return f"${salary}{'0' * bonus}"


def bonus_time(salary, bonus):
	return f'${salary * (1 + bonus * 9)}'


def bonus_time(b, c):
	return f"${b}{'0' * c}"


def bonus_time(salary, bonus):
	return f'${salary}0' if bonus else f'${salary}'


def bonus_time(salary, bonus):
	return '$' + str(int(salary) + bonus * (9 * salary))


def bonus_time(salary, bonus):
	s = salary * 10
	if bonus is True:
		return '$' + str(s)
	if bonus is False:
		return '$' + str(salary)


def bonus_time(salary, bonus):
	i = 0
	if bonus is True:
		i = salary * 10
	if bonus is False:
		i = salary
	return '$' + str(i)


def bonus_time(salary, bonus):
	if bonus == True:
		result = '$' + str(salary * 10)
	elif bonus == False:
		result = '$' + str(salary)
	return result


def bonus_time(salary, bonus):
	a = lambda s, b: '${}'.format(s * 10) if b == True else '${}'.format(s)
	return a(salary, bonus)


def bonus_time(salary, bonus):
	if bonus == True:
		salary = salary * 10
		s = '$' + str(salary)
		return s
	else:
		s = '$' + str(salary)
		return s


def bonus_time(salary, bonus):
	if bonus == True:
		return '$' + str(salary) + '0'
	elif bonus == False:
		return '$' + str(salary)


bonus_time = lambda s, b: f'${s * (9 * b + 1)}'


def bonus_time(salary, bonus):
	if bonus == True:
		k = str(salary * 10)
	else:
		k = str(salary)
	return '$' + k


def bonus_time(s, b):
	return '${}'.format(s * 10 if b else s)


def bonus_time(salary, bonus):
	b = salary
	if bonus:
		b *= 10
	return '$' + str(b)


def bonus_time(salary, bonus):
	return '$' + str(salary * 10) if bonus == True else f'${salary}'


def bonus_time(salary, bonus):
	if bonus == True:
		salary = salary * 10
	amt = str(salary)
	return '${}'.format(amt)


def bonus_time(salary: int, bonus: bool):
	if bonus is True:
		return '$' + str(salary * 10)
	return '$' + str(salary)


def bonus_time(a, b):
	return f'${(a * 10 if b else a)}'


def bonus_time(salary, bonus):
	x = lambda salary, bonus: str('$' + str(salary * 10)) if bonus == True else str('$' + str(salary))
	return x(salary, bonus)


def bonus_time(salary, bonus):
	return '$' + str(salary) if bonus is False else '$' + str(salary * 10)


bonus_time = lambda salary, bonus: bonus and '$' + str(salary * 10) or '$' + str(salary)


def bonus_time(salary, bonus):
	if bonus == True:
		new = salary * 10
		return str('$' + str(new))
	else:
		return str('$' + str(salary))


def bonus_time(salary, bonus):
	if bonus == True:
		salary = salary * 10
	else:
		salary = salary + 0
	return '$' + str(salary)


def bonus_time(salary, bonus):
	if bonus == True:
		result = salary * 10
	else:
		result = salary
	return f'${result}'


bonus_time = lambda s, b: f'${(s * 10 if b else s)}'


def bonus_time(salary, bonus):
	return '${}'.format(str(salary * 10)) if bonus == True else '${}'.format(salary)


def bonus_time(salary, bonus):
	x = salary * 10
	if bonus == True:
		return f'${x}'
	elif bonus == False:
		return f'${salary}'


def bonus_time(s, b):
	return '$' + (str(s * 10) if b == True else str(s))


def bonus_time(salary, bonus):
	x = str(int(salary) * 10)
	y = str(int(salary))
	if bonus == True:
		return str('$') + x
	else:
		return str('$') + y


def bonus_time(salary, bonus):
	if bonus == True:
		salary *= 10
		a = '${}'.format(salary)
		return a
	return '$' + str(salary)


def bonus_time(salary, bonus):
	x = salary
	y = 10 * salary
	if bonus:
		return '$' + str(y)
	else:
		return '$' + str(x)


def bonus_time(salary, bonus):
	if bonus:
		salary = salary * 10
	x = str(salary)
	return '$' + x


def bonus_time(salary, bonus):
	result = str(salary * 10) if bonus else str(salary)
	return '${}'.format(result)


def bonus_time(salary, bonus):
	if bonus == True:
		total = salary * 10
		return '$' + str(total)
	if bonus == False:
		return '$' + str(salary)


def bonus_time(salary, bonus):
	pay = str(salary * 10) if bonus else str(salary)
	return '${}'.format(pay)


def bonus_time(salary, bonus):
	total = salary
	if bonus:
		salary *= 10
	return '$%d' % salary


def bonus_time(salary, bonus):
	int(salary)
	bool(bonus)
	if bonus == 1:
		return '$' + str(salary * 10)
	elif bonus == 0:
		return '$' + str(salary)


def bonus_time(s, b):
	return '$' + str(s * (10 if b else 1))


def bonus_time(salary: int, bonus: bool) -> str:
	return '$' + str(salary * 10) if bonus else '$' + str(salary)


def bonus_time(salary, bonus):
	if bonus == True:
		wow = salary * 10
		return '$' + str(wow)
	else:
		bonus == False
		return '$' + str(salary)


def bonus_time(salary, bonus):
	if bonus == True:
		amount = salary * 10
		return '$' + str(amount)
	elif bonus == False:
		return '$' + str(salary)