# Tutorial 2 - Problem 4 - Exercise 5.4

def recurse(n, s):
  """ Function recurse(...) prints the value of s when n == 0

      Parameter n is an integer and must be >= 0
      Parameter s is an integer and can be assigned any value

      Returns nothing
  """
  if n == 0:
    print(s)
  else:
    recurse(n-1, n+s)
  return


# Main part of the program
recurse(3, 0)


# The output is: 6


# Infinite recursion
# recurse(-1, 0)