Assignment 1
Write a python function named cube which computes the cube of a given number n.
Assignment 2
Write a python function named avg which computes the average of a and b.
Assignment 3
Add docstring to the function f.
Assignment 4
Write a python function named circle which returns the area and perimeter of a circle given radius r.
Assignment 5
What will the function do?
def what(x)
return x*x
- Returns the square of x
- Returns x
- Function doesn't have docstring
- Error
How many arguments can be passed to a python function?
None
One
Two
Any
Write a function which calculates the area of a rectangle.