ES 102 - Introduction To Computing Lab Assignment - 4: October 9, 2015
This document outlines 5 programming assignments for an Introduction to Computing lab class. The assignments include: 1) Designing algorithms to calculate factorials with and without recursion. 2) Writing a program to calculate trigonometric, exponential and factorial functions using Taylor series expansions. 3) Creating a function to find the maximum and minimum values from a set of 3 floats. 4) Writing a function that takes a float and returns a value using the formula 1+e1−x. 5) Composing a function to return 1 if a float is positive, 0 if it's zero, and -1 if it's negative.
ES 102 - Introduction To Computing Lab Assignment - 4: October 9, 2015
This document outlines 5 programming assignments for an Introduction to Computing lab class. The assignments include: 1) Designing algorithms to calculate factorials with and without recursion. 2) Writing a program to calculate trigonometric, exponential and factorial functions using Taylor series expansions. 3) Creating a function to find the maximum and minimum values from a set of 3 floats. 4) Writing a function that takes a float and returns a value using the formula 1+e1−x. 5) Composing a function to return 1 if a float is positive, 0 if it's zero, and -1 if it's negative.
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.