This kata is about multiplying a given number by eight if it is an even number and by nine otherwise.

Difficulty: EASY
Tags: Fundamentals

Starter code:
def simple_multiplication(number) :
	

Solutions:
def simple_multiplication(number):
	return number * 9 if number % 2 else number * 8


def simple_multiplication(n):
	return n * (8 + n % 2)


simple_multiplication = lambda a: a * (8 + (a & 1))


simple_multiplication = lambda n: n.__mul__(n.__and__(bool(n)).__add__(len(__name__)))


def simple_multiplication(n):
	return n * 8 if n % 2 == 0 else n * 9


def simple_multiplication(number):
	if number % 2 == 0:
		return number * 8
	return number * 9


simple_multiplication = lambda n: n * (8 + (n & 1))


simple_multiplication = lambda num: num * (8 + num % 2)


def simple_multiplication(x):
	if x % 2 == 0:
		return x * 8
	else:
		return x * 9


simple_multiplication = lambda n: n * 8 if n % 2 == 0 else n * 9


simple_multiplication = lambda Q: Q * (8 + (1 & Q))


def simple_multiplication(number):
	return number * (8 + number % 2)


def simple_multiplication(number):
	if number % 2 == 0:
		num = number * 8
	else:
		num = number * 9
	return num


def simple_multiplication(number):
	return number * (8 + (number & 1))


def simple_multiplication(number):
	return number << 3 if number % 2 == 0 else 9 * number


def simple_multiplication(num):
	return num << 3 if not num % 2 else num * 9


def simple_multiplication(number):
	return (number << 3) + number * (number & 1)


simple_multiplication = lambda num: num * 9 if num % 2 else num * 8


simple_multiplication = lambda n: 8 * n + n % 2 * n


def simple_multiplication(n):
	return (n << 3) + (n & 1) * n


def simple_multiplication(number):
	print(number)
	if number % 2 == 0:
		simple_multiplication = number * 8
	elif number % 2 == 1:
		simple_multiplication = number * 9
	return simple_multiplication


def simple_multiplication(number):
	return number % 2 and number * 9 or number * 8


def simple_multiplication(number):
	if number % 2 == 0:
		return number * 8
	if number % 2 == 1:
		return number * 9
	else:
		return 0


def simple_multiplication(number: int) -> int:
	return number * 8 if number % 2 == 0 else number * 9


def simple_multiplication(num):
	divided = num % 2
	if divided == 0:
		return num * 8
	else:
		return num * 9


def simple_multiplication(number):
	if number % 2 == 0:
		number *= 8
		return number
	else:
		number *= 9
		return number
simple_multiplication(10)


def simple_multiplication(number):
	ans = 0
	if number % 2 == 0:
		ans = number * 8
	else:
		ans = number * 9
	return ans


def simple_multiplication(n):
	return n * (8 + (n & 1))


def simple_multiplication(number):
	total = number * 9
	if number % 2 == 0:
		total = total - number
	return total


def simple_multiplication(number):
	if int(number) % 2 == 0:
		return int(number) * 8
	elif int(number) % 2 != 0:
		return int(number) * 9


def simple_multiplication(n):
	return n * 9 if n % 2 == 1 else n * 8


def simple_multiplication(number):
	if number % 2 == 0:
		new_number = number * 8
	else:
		new_number = number * 9
	return new_number


def simple_multiplication(n):
	return n * (n % 2 * 9 + (n - 1) % 2 * 8)


from math import *

def simple_multiplication(number):
	if fmod(int(number), 2) == 0:
		even = True
	else:
		even = False
	if even == True:
		return int(number) * 8
	else:
		return int(number) * 9


def simple_multiplication(number):
	return number * 8 + (0 if number % 2 == 0 else number)


def simple_multiplication(number):
	return int(''.join(str(number * 8) if number % 2 == 0 else str(number * 9)))


def simple_multiplication(number):
	if number % 2 == 0:
		multi = number * 8
		return multi
	else:
		multi = number * 9
		return multi
simple_multiplication(3)


def simple_multiplication(number):
	return number * 8 if number and number % 2 == 0 else number * 9


def simple_multiplication(number):
	if number % 2 == 0:
		return number * 8
	else:
		return number * 9
print(simple_multiplication(5))


def simple_multiplication(a):
	for i in range(a):
		if a % 2 != 0:
			b = a * 9
		else:
			b = a * 8
	return b


def simple_multiplication(number):
	if number % 2 == 0:
		c = number * 8
		return c
	else:
		f = number * 9
		return f


def simple_multiplication(number):
	format_number = int(number)
	result = format_number * 8 if format_number % 2 == 0 else format_number * 9
	return result


def simple_multiplication(number):
	even = 8
	odd = 9
	if number % 2 == 0:
		return number * even
	else:
		return number * odd


def simple_multiplication(number):
	return number * (8 + (number % 2 != 0) * 1)


def simple_multiplication(number):
	if number % 2 == 0:
		even_multiply = number * 8
		return even_multiply
	else:
		odd_multiply = number * 9
		return odd_multiply


def simple_multiplication(number):
	if number % 2 == 0:
		x = number * 8
		return x
	else:
		y = number * 9
		return y


def simple_multiplication(number):
	return number * (9 - int(number % 2 == 0))


def simple_multiplication(number):
	return number * 9 if number & 1 else number * 8


def simple_multiplication(number):
	x = number / 2
	if x == round(x, 0):
		return number * 8
	else:
		return number * 9


def simple_multiplication(number):
	res = 0
	if number % 2 == 0:
		res = number * 8
	else:
		res = number * 9
	return res


simple_multiplication = lambda x: (x << 3) + x * (x & 1)


def simple_multiplication(number):
	Temp = number % 2
	if Temp == 0:
		TempMul = number * 8
		return TempMul
	if Temp != 0:
		TempMul = number * 9
		return TempMul


def simple_multiplication(num):
	if num % 2 == 0:
		return num * 8
	if num % 2 == 1:
		return num * 9
print(simple_multiplication(9))


def simple_multiplication(number):
	if number % 2 == 0 or number == 0:
		return number * 8
	elif number % 2 != 0 or number == 1:
		return number * 9