Introduction to Python Modules Preeti Arora Class 11 IP Solution || Introduction to Python Modules Class 11 Solution || Introduction to Python Modules Class 11 IP Solution || Introduction to Python Modules Information Practices Solution || Preeti Arora Introduction to Python Modules Solution || Introduction to Python Modules Class 11 IP || Introduction to Python Modules Solution


Note :-  Please Click on Question to Answer of that Question !!!


Q1. What is a Python library? Explain with example.


Q2. Write a module to input total number of days and find the total number of months and remaining days after months, and display it in another program.


Q3. What is a module? What is the file extension of a Python module?


Q4. How do you reuse the functions defined in a module in your program?


Q5. In how many ways can you import objects from a module?


Q6. How are the following two statements different from each other?
(i) Import math
(ii) From math import



Q7. What is the utility of math module?


Q8. How does Python resolve the scope of a name or identifier?


Q9. A program having multiple functions is considered better designed than a program without any functions. Why?


Q10. Write a module called calculate_area() that takes base and height as an input argument and returns an area of a triangle an output. The formula used is,
Triangle Area = 1/2*base*height



Q11. Rewrite the following Python code after removing all syntax error(s). Underline the corrections done.
def main ():
    r = input('enter any radius:')
    A - pi * maths.pow(r,2)
    Print ("Area = "+a)
        Main ()




Q12. What is the significance of assigning namespace to Python modules?


Q13. What is the difference between import statement and from import statement?


Q14. Why is from import * statement not recommended for importing Python modules in an external program?


Q15. Write a function to calculate volume of a box with appropriate default values for its parameters. Your function should have the following input parameters:
(a) Length of box
(b) Width of box
(c) Height of box
Test it by writing complete program to invoke it.



Q16. Consider the temperature given below for the month of June in North India. Calculate the average temperature and median value. This temperature gets dipped with a variation of 20° C in the month of December. Write a Python program to calculate the changed median value and average temperature.


Q17. Consider the amount of donations received by a charitable organization given as under:
donations = [100, 60, 70, 900, 100, 200, 500, 500, 503, 600, 1000, 1200]
Now write a Python program to calculate the average amount obtained and median of the above data.



Q18. Write a Python program to generate a random number between 0 and 9.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post