Exercise 1: Factorial Calculation Write a recursive function factorial(n) that calculates the factorial of a non-negative integer n. The factorial of a number is the product of all positive integers less than or equal to that number.

Exercise 2: Fibonacci Sequence Write a recursive function fibonacci(n) that returns the nth term in the Fibonacci sequence. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting from 0 and 1.

Exercise 3: Power Calculation Write a recursive function power(base, exponent) that calculates the result of raising a base number to an exponent. Assume both the base and exponent are non-negative integers.

Exercise 4: Binary Search Implement a recursive function binarySearch(arr, target, low, high) that performs a binary search on a sorted array arr to find the index of a target element target. The function should return the index if found, or -1 if the target is not present in the array.

Exercise 5: Palindrome Check Write a recursive function isPalindrome(str) that checks if a given string str is a palindrome. A palindrome is a string that reads the same forward and backward when ignoring spaces, punctuation, and capitalization.