$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #10

Fill the operator to add n to the recursive result.

def rec(n):
    if n == 0: return 0
    return n ____ rec(n - 1)

Answer: + (also accepted: +)

It sums n with the sum of everything below → 1+2+…+n.
Play Problem Solving ▸