ASSIGN-1 - Functions MTC-233

You might also like

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

MTC - 233 2022-23 Assignment 1 :

Unit 1: Introduction to Python

Write Python functions that:

1. Returns the square and the cube of a given real number.

2. Prints sine, cosine and log of a number.

3. Define function f(x) = 4x2+3 x –23. Find the value of f(19) and f(23).

4. Define function f(x)= sin(x)+tan(x). Find the value of f(/4 ) and f(/6).

5. Define function f(a,b) = (4a+b) +3(a –6b). Evaluate f(1, –2.5)

5 𝑎−2
6. Finds the value of (
𝑎2 −1
) + ( 𝑏2+2𝑏+13 ). Evaluate function for a=2,b=3.

7. Finds the maximum of given three numbers (without using max() from python).

8. Finds the minimum of given three numbers (without using min() from python).

x 5 − 20x 5 , if x < 10
9. Define function , f(x) = { 1 . Find f(– 9) and f(20).
, if x ≥ 10
x

x 4 , if 0 < 𝑥 < 15
10. Define function, f(x) = { √x, if x ≥ 10 . Find g(– 5), g(15) and g(5
10 x, otherwise

-------------------**----------------

Note : Do not use input() command in function.

You might also like