Computer Science
What is a Python library? Explain with examples.
Python Modules
2 Likes
Answer
The Python library is an extensive collection of functions and modules that help the programmer in the faster development of programs.
For example, NumPy, Pandas etc.
Answered By
1 Like
Related Questions
Assertion (A): Python modules are .py files that contain Python code.
Reasoning (R): The import statement allows you to import all the functions from a module into your code.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): The output of print(math.factorial(4.5)) shall generate an error.
Reasoning (R): This factorial() function belongs to the statistics module in Python.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Write a module to input total number of days and find the total number of months and remaining days and display it in another program.
What is a module? What is the file extension of a Python module?