Cody Bable

Generation

generate functionThu, 20 Apr 2023

product sum of 50 integers

def product_sum(n): sum = 0 for i in range(1, n+1): sum = sum + i * i return sum product_sum(50)

Questions about programming?Chat with your personal AI assistant