Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

ES 102 - Introduction to Computing

Lab Assignment - 4

October 9, 2015

1. Design algorithms to find the factorial of a given integer with and


without recursion.
2. Compose a program which takes a float x as argument and computes
sin(x), cos(x), tan(x), ex using Taylors series expansion (use function
for computing factorial).
3. Compose a function to find the maximum and minimum value from a
set of 3 floats.
4. Compose a function which takes a float x as argument and returns
another float obtained using the formula 1+e1x .
5. Compose a function which takes a float n as argument and returns 1
if n is greater than 0, returns 0 if n is equal to 0 and returns 1 if n
is lesser than 0.

You might also like