What is wrong?


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/0/5?curriculum_id=4f89dab3d788890003000096

factorial(2) returned 4 instead of 2


def factorial(x):          #return x!
    y=1                    #define result variable
    for i in range(1,x+1): #loop through #s from 1 to x
        y=y*x              #multiply result by #
    return y               #return result


#2

Your using *x instead of *i therefore you multiply with 2 in every loop and not with an ascending series of numbers.