Find the factorial of n number
Method 1: Using Reduce
The reduce() function accepts a function and a sequence and returns a single value calculated as follows:
Initially, the function is called with the first two items from the sequence and the result is returned.
The function is then called again with the result obtained in step 1 and the next value in the sequence. This process keeps repeating until there are items in the sequence.
The syntax of the reduce() function is as follows:
Syntax: reduce(function, sequence[, initial]) -> value
Method 2: Using Reduce
Method 3: Using Recursion
Method 4: Using Recursion
find the sum of square series
# find the sum of square series