Python Assingment 3
Python Assingment 3
1. Develop a Python program to find area and perimeter of circle using user defined functions. For
this program create area() and perimeter() functions.
2. Develop a Python program to find volume and surface area of cuboid using user defined
functions. For thos program create volume() and surface_area() functions.
3. Develop a Python program to find factorial of given number using ‘Recursion’.
4. Develop a Python program to create a module named mycalc. In mycalc module create four
functions add(), sub(), mult() and div() with following functionalities:-
add() function return summation of two numbers.
sub() function return subtraction of two numbers.
mult() function return multiplication of two numbers.
div() function return division of two numbers.
Now import this mycalc module to another python program and test all functions.
5. Develop a Python program to create a module named tempconv. In tempconv module create
two functions ctof() and ftoc(). The ctof() function converts temperature from centigrade to
Fahrenheit and ftoc() function converts temperature from Fahrenheit to centigrade. Now import
this tempconv module to another python program and test ctof() and ftoc() functions.