Generation

generate functionSun, 13 Nov 2022

sum up a list of numbers

def sum(arr): total = 0 for num in arr: total += num return total sum([1, 2, 3, 4, 5])

Want to kickstart your project?Use the new AI Studio to create your code