13. Product


#1



https://www.codecademy.com/en/courses/python-intermediate-en-rCQKw/2/3?curriculum_id=4f89dab3d788890003000096#


it says I don't have a function called product defined. when clearly i do.

Oops, try again. Did you create a function called product? Your code threw a "global name 'product' is not defined" error.


def product(numbers):
    result = 1
    for i in numbers
        result *= int(i)
    return result


#2

for i in numbers // missing colon

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.