As part of this topic we will see functions/definitions in detail

- Functional programming is a programming paradigm (others: Imperative and logical)
- Advantages of Functional programming
- Simple reasoning principles
- Better modularity
- Good for leveraging multicore for parallelism and cloud computing

- Functions are expressions (not statements)
- Functions can be nested
- Functions can be assigned to variables
- Functions can be returned, passed as arguments
- Even though Scala supports both call by value and call by name, default is call by value. It is also recommended to use call by value. Do not worry too much about difference at this time.

## Task 1 – Factorial

Develop a function which will return factorial of a given number

## Task 2 – Fibonacci

Develop a function which will print number of elements in a Fibonacci series

## Task 3 – Factorial Recursive

Develop a function which will return factorial of a given number recursively

## Task 4 – Combinations

Given 2 arguments n and r compute nCr (n! / ((n-r)! * r!))

## Exercise – isFibonacci

Given 1 argument which takes an integer return true if the number belongs to fibonacci series else return false (eg: isFibonacci(13) should return true and isFibonacci(24) should return false)

Hai!!!

I am getting an error at fact(n)/(fact(n-r) * fact®)“value / is not a member of unit and value * is not a member of unit” can you help me with this?