Using Python Libraries Class 12 Important Questions

Teachers and Examiners (CBSESkillEduction) collaborated to create the Using Python Libraries Class 12 Important Questions. All the important Information are taken from the NCERT Textbook Computer Science (083) class 12.

Using Python Libraries Class 12 Important Questions

1. What is module, package and a library?
Answer – A module is a file that includes Python functions, global variables, and other things. It is merely a.py file containing Python executable code or statements. A package is a namespace that includes several other packages and modules.
Library It consists of a variety of packages. Conceptually, there is no distinction between a Python library and a package.

2. What is a python module?
Answer – A file with Python definitions and statements is known as a module. Variables, classes, and functions can all be defined in a module. Runnable code may also be included in a module. Code that has been grouped together into modules is simpler to read and utilise. Additionally, it organises the code logically.

Using Python Libraries Class 12 Important Questions

3. What is the utility of built – in function help()?
Answer – The documentation for modules, functions, classes, keywords, etc. is shown using the help() function. The interactive help tool launches on the console if we don’t pass an argument to the help function.

4. What is docstrings? How are they useful?
Answer – A Python module, class, function, or method is documented with a string known as a “docstring” so that programmers may understand what it does without having to learn the specifics of how it is implemented. Additionally, it is usual practice to automatically produce online (html) documentation from docstrings.

5. What happens when Python encounters an import statement in a program?
Answer – If the module is found in the search path when the interpreter comes across an import statement, it is imported. The interpreter uses a search path, which is a list of directories, when importing a module.

Using Python Libraries Class 12 Important Questions

6. What is the procedure to create own library/package in Python?
Answer – You need to give your Python package a special name. No two Python packages with an existing name can have the same name. The name of your package must be the same for both the parent folder and the subfolder. There are packages and parameter names in the setup.py file.

7. Why is a package attached to site-package folder of Python installation?
Answer – What function does the Python installation’s site-packages folder serve? The default location and folder from which the Python interpreter imports all user-defined packages and libraries is called site-package. So, in order to import any package using the import command, we must attach it to the Python installation’s site-package folder.

Computer Science Class 12 Notes

  1. Python Revision tour – 1 Class 12 Notes
  2. Python Revision tour – 2 Class 12 Notes Notes
  3. Working with Functions Class 12 Notes
  4. Using Python Libraries Class 12 Notes
  5. File Handling Class 12 Notes
  6. Recursion Class 12 Notes
  7. Idea of Algorithmic Efficiency Class 12 Notes
  8. Data Visualization using Pyplot Class 12 Notes
  9. Data Structure Class 12 Notes
  10. Computer Network Class 12 Notes
  11. More on MySQL Class 12 Notes

MCQ for Class 12 Computer Science Python

  1. Python Revision tour – 1 Class 12 MCQs
  2. Python Revision tour – 2 Class 12 MCQs
  3. Working with Functions Class 12 MCQs
  4. Using Python Libraries Class 12 MCQs
  5. File Handling Class 12 MCQs
  6. Recursion Class 12 MCQs
  7. Data Visualization using Pyplot Class 12 MCQs
  8. Data Structure Class 12 MCQs
  9. Computer Network Class 12 MCQs
  10. More on MySQL Class 12 MCQs

Computer Science Class 12 Questions and Answers

  1. Python Revision tour – 1 Class 12 Questions and Answers
  2. Working with Functions Class 12 Questions and Answers
  3. Using Python Libraries Class 12 Questions and Answers
  4. File Handling Class 12 Questions and Answers
  5. Recursion Class 12 Questions and Answers
  6. Idea of Algorithmic Efficiency Class 12 Questions and Answers
  7. Data Structure Class 12 Questions and Answers
  8. More on MySQL Class 12 Questions and Answers
  9. Computer Network Class 12 Questions and Answers
  10. More on MySQL Class 12 Questions and Answers 
error: Content is protected !!