"""
Recursive Factorial
"""
def recursive_factorial(num):
    if num <= 1:
        return 1
    else:
        return num * recursive_factorial(num - 1)

def factorial(num):
    """
    returns num!
    """
    prod = 1
    while num > 1:
        prod = num * prod
        num = num - 1
    return prod

def sum_even(to):
    """
    Takes the sum of all even numbers up to 'to'.
    """
    the_sum = 0
    while to > 0:
        if to % 2 == 0:
            the_sum = the_sum + to
        to = to -1

    return the_sum

def whats_this(num):
    for i in range(1, num, 2):
        print(i)

def sum_even_for(to):
    """
    Takes the sum of all even numbers up to 'to'.
    """
    the_sum = 0
    for i in range(2, to + 1, 2):
        the_sum = the_sum + i
    return the_sum

def factorial_for(num):
    """
    returns num!
    """
    fact = 1
    for i in range(1, num + 1):
        fact = fact * i
        return fact
