input: def f(n):
      """ Develop the function f that takes an integer n as an input and produces a list containing n elements. 
      For each index i (starting from 1), if i is even, the element should be the factorial of i, 
      otherwise it should be the sum of all numbers from 1 to i.
      Example:
      f(5) == [1, 2, 6, 24, 15]
      """
output:     def factorial(x):
          if x == 0 or x == 1:
              return 1
          else:
              return x * factorial(x - 1)
  
      def sum_up_to(x):
          return x * (x + 1) // 2
  
      result = []
      for i in range(1, n + 1):
          if i % 2 == 0:
              result.append(factorial(i))
          else:
              result.append(sum_up_to(i))
      return result