#Complete the function which counts up to a given number (20)
#DEFINE the fizz_buzz function that accepts a number (20):
#INIT a variable RESULT, and set it to an empty string ""
# create a loop to iterate from 1 to the given number (20) inclusevly:
    #if a multiple of 3 is encountered -> concatenate "fizz" to the RESULT var.
    #if a multiple of 5 is encountered -> concatenate "buzz" to the RESULT var.
    #if a multiple of 3 and 5 is encountered -> concatenate FizzBuzz to RESULT.
    #OTHERWISE, conver number to a string and concatenate it to the RESULT var
# return the RESULT variable
#split test from function:
#call the fizz_buzz function, and pass number 20 to it
#OUTPUT what function fizz_buzz returns
# DEFINE the fizz_buzz function that accepts a number
def fizz_buzz(number):
    # INIT a variable RESULT, and set it to an empty string
    result = ""

    # create a loop to iterate from 1 to the given number inclusively
    for i in range(1, number + 1):

        # if a multiple of 3 and 5 is encountered
        if i % 3 == 0 and i % 5 == 0:
            result += "FizzBuzz, "

        # if a multiple of 3 is encountered
        elif i % 3 == 0:
            result += "Fizz, "

        # if a multiple of 5 is encountered
        elif i % 5 == 0:
            result += "Buzz, "

        # OTHERWISE, convert number to a string
        else:
            result += str(i) + ", "

    # return the RESULT variable
    return result [:-2]
# split test from function:
# call the fizz_buzz function, and pass number 20 to it

output = fizz_buzz(20)

# OUTPUT what function fizz_buzz returns
print(output)