Cody Bable

Generation

generate functionThu, 20 Apr 2023

calculate the product of 50 integers

def factorial(n): product = 1 for i in range(1, n+1): product = product * i return product

Questions about programming?Chat with your personal AI assistant