CBSE CS and IP

CBSE Class 11 & 12 Computer Science and Informatics Practices Python Materials, Video Lecture

Using Python Libraries (2 Marks Questions)


  1. What is the problem with the following piece of code give explanations after correction:
    from math import factorial
    print(math.factorial(5))
    

  2. What is a Python module? What is its significance?
  3. Rewrite the following Python code after removing all syntax error(s). Underline the correction done.
    1
    2
    3
    4
    5
    def main( ):
        r = input("Enter any radius : ")                                
        A -pi * math s .pow(r,2)
        Print("Area = "+a)
    Main()
    
  4. Write the answers to the following questions: 
    1. How are packages and modules related to each other?
    2. What is the difference between "import" statement and "from import" statement?

No comments:

Post a Comment