write a function that returns an array containing the numbers from 1 to n where n is the parametered value n will never be less than 1 replace certain values however if any of the following conditions are met if the value is a multiple of 3 use the value fizz instead if the value is a multiple of 5 use the value buzz instead if the value is a multiple of 3 5 use the value fizzbuzz instead there is no fancy algorithm to solve fizz buzz iterate from 1 through n use the mod operator to determine if the current iteration is divisible by 3 and 5 fizzbuzz 3 fizz 5 buzz else string of current iteration return the results complexity time on space on validate the input alternative solution there is no fancy algorithm to solve fizz buzz iterate from 1 through n use the mod operator to determine if the current iteration is divisible by 3 and 5 fizzbuzz 3 fizz 5 buzz else string of current iteration return the results complexity time o n space o n validate the input alternative solution
def fizzbuzz(n):
    
    
    if n < 1:
        raise ValueError('n cannot be less than one')
    if n is None:
        raise TypeError('n cannot be None')
    
    result = []
    
    for i in range(1, n+1):
        if i%3 == 0 and i%5 == 0:
            result.append('FizzBuzz')
        elif i%3 == 0:
            result.append('Fizz')
        elif i%5 == 0:
            result.append('Buzz')
        else:
            result.append(i)
    return result


def fizzbuzz_with_helper_func(n):
    return [fb(m) for m in range(1,n+1)]
    
def fb(m):
    r = (m % 3 == 0) * "Fizz" + (m % 5 == 0) * "Buzz"
    return r if r != "" else m