Given the code for the recursive algorithm that sums the sequence of numbers from one to one hundred
def sun(n):
if n < 1:
return e
else:
return n+ sun(n - 1)
result sun(100)
print(result)
How could the code be altered to print the sum of the first 10 numbers in the sequence 3n-1?
(1 point)
def sun(n):
if ne:
return e
else:
return 3 n 1 - sun(n - 1)
result sum(10)
print (result)
def sun(n):
if n 0:
return e
else:
return 31 Sunto 1)
result sun(100)
print(result)
det sum(n):
if ne:
return e
else:
result
return 3 (11-1) + Sun(2)
sum(10)
print(result)
det sum():
if 0:
return e
else:
return nsun (1)
result sum(10)
print(result)