Untitled
10 Questions
5 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

you can find the name of a module by using the ____ attribute of the module/

  • name
  • _name_ (correct)
  • name_
  • _name

_____is the built-in function that lists the identifiers defined in a module.

  • directory
  • dir
  • dir() (correct)
  • show()

every package in python is a directory which must have a special file called____

  • _init_.py (correct)
  • init_.py
  • _init.py
  • init.py

which of the statements is used to import all names from a module into the current calling module?

<p>import* (A)</p> Signup and view all the answers

what does the following statements do? import keyword,sys

<p>imports the keyword and sys modules (B)</p> Signup and view all the answers

which module is used for file input/output operations in python?

<p>os (A)</p> Signup and view all the answers

which module is used to work with mathematical functions in python?

<p>math (B)</p> Signup and view all the answers

what is the output of the following code? import math print(math.ceil(3,2))

<p>4 (C)</p> Signup and view all the answers

which of the following is not a valid namespace?

<p>public namespace (B)</p> Signup and view all the answers

which keyword is used to import a module and rename it in python?

<p>as (C)</p> Signup and view all the answers

More Like This

Python Modules and Packages Quiz
5 questions
Python Modules and Packages
5 questions
Python Unit 5: Modules and Packages
55 questions
Use Quizgecko on...
Browser
Browser