================================================================================
  Question 11: Recursive Functions - Sum of Natural Numbers & Factorial
================================================================================

FULL QUESTION:
Task: Implement two recursive Python functions for a given non-negative integer n:
1. Calculates the sum of all natural numbers from 1 to n: sum_of_n(n)
2. Calculates the factorial of n (n!): factorial(n)

Test your functions with:
- n = 5
- n = 10
- n = 18

SHORT QUESTION:
Recursive implementations to compute the sum of first n natural numbers and factorial of n.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 11: Recursive Functions - Sum of Natural Numbers & Factorial

- Prerequisites: Python 3.x (Standard library only).
- Setup: None.
- How to Run: python question_11.py
- Expected Behavior: Computes and prints sum and factorial for test values (5, 10, 18).

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_11.py
--------------------------------------------------------------------------------
def sumofn(n):
    if n == 0:
        return 0
    return n + sumofn(n-1)

def factorial(n):
    if n <= 1:
        return 1
    return n * factorial(n-1)

n = 5
print(f"Sum of {n} = {sumofn(n)}")
print(f"Factorial of {n} = {factorial(n)}")

n = 10
print(f"Sum of {n} = {sumofn(n)}")
print(f"Factorial of {n} = {factorial(n)}")

n = 18
print(f"Sum of {n} = {sumofn(n)}")
print(f"Factorial of {n} = {factorial(n)}")
--------------------------------------------------------------------------------
