Computer Science, asked by panav1669, 8 months ago

Implement the sum_positive_numbers function, as a recursive function that returns the sum of all positive numbers between the number n received and 1. For example, when n is 3 it should return 1+2+3=6, and when n is 5 it should return 1+2+3+4+5=15.

Answers

Answered by parveenkumarpa91
0

Answer:

35^+€889

7891÷77+561

568

Answered by Anonymous
9

Answer:

its a python program

Explanation:

#a recursive function that returns the sum of all positive numbers between the number n received and 1..

def sum_positive_numbers(n):

   sum=0

   for i in range(1,n+1):

       sum+=i

   return sum

#main

num=int(input("enter the limit"))

print(sum_positive_numbers(num))

#HOPE IT HELPS YOU

PLEASE MARK BRAINLIEST

Similar questions