Computer Science - Informatics Practices Class XI/XII Python Module Solved Test Part 5
Q1. Name the library which is to be imported to use the following functions.
a. log() b. pow()
Q2. Create a module temp.py which contain the following functions.
a. ctk() #which converts degree celsius to kelvin.
b. ctf() #which converts degree celsius to fahrenheit.
Q3. Write a function in2f() in python which takes input in inches and display result in feet. [1feet = 15inches]
Q4. Write the output of the following:
import math
print(math.floor(7.2))
Q5. How modules and packages are related to each other?
Q6. Create a module vol.py which contains the following functions.
a. volcyl() # which calculates volume of cylinder.
b. volcube() # Which calculate volume of cube.
c. volcuboid() #Which calculates volume of cuboid
Q7. What is library in python?
Q8. State the difference between import math and from math import*
No comments:
Post a Comment