Description:

#Task:

Write a function that returns true if the number is a "Very Even" number.

If a number is a single digit, then it is simply "Very Even" if it itself is even.

If it has 2 or more digits, it is "Very Even" if the sum of it's digits is "Very Even".


#Examples:
```
input(88) => returns false -> 8 + 8 = 16 -> 1 + 6 = 7 => 7 is odd 

input(222) => returns true

input(5) => returns false

input(841) => returns true -> 8 + 4 + 1 = 13 -> 1 + 3 => 4 is even
```

Note: The numbers will always be 0 or positive integers!

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Mathematics

Starter code: def is_very_even_number(n):
	

Solutions:
def is_very_even_number(n):
	while len(str(n)) > 1:
		n = sum((int(x) for x in str(n)))
	return True if n % 2 == 0 else False


def is_very_even_number(n):
	return n == 0 or (n - 1) % 9 % 2


def is_very_even_number(n):
	if n < 10:
		return n % 2 == 0
	return is_very_even_number(sum((int(d) for d in str(n))))


def get_sum(x):
	return sum((int(t) for t in list(str(x))))

def is_very_even_number(n):
	result = get_sum(n)
	while len(str(result)) >= 2:
		result = get_sum(result)
	return result % 2 == 0


def is_very_even_number(n):
	return is_very_even_number(sum((int(i) for i in str(n)))) if n > 9 else not n % 2


def is_very_even_number(n):
	while n >= 10:
		(p, n) = (n, 0)
		while p > 0:
			re = p % 10
			n += re
			p //= 10
	return n % 2 == 0


def is_very_even_number(n):
	if len(str(n)) == 1:
		return n % 2 == 0
	return is_very_even_number(sum(map(int, list(str(n)))))


def is_very_even_number(n):
	while n >= 10:
		n = sum(map(int, str(n)))
	return n % 2 == 0


def is_very_even_number(n):
	if n < 10:
		return n % 2 == 0
	return is_very_even_number(sum(map(int, str(n))))


def is_very_even_number(n):
	return True if not n else all((not n % 9 % 2, n % 9))