Python Modules Quiz
FREE Online Courses: Dive into Knowledge for Free. Learn More!
Quiz Summary
0 of 10 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 10
1. Question
Built-in modules are written in ____ language.
CorrectIncorrect -
Question 2 of 10
2. Question
PYTHONPATH is a ____ variable.
CorrectIncorrect -
Question 3 of 10
3. Question
How many times does Python compile an imported module.
CorrectIncorrect -
Question 4 of 10
4. Question
What built-in attribute returns the path of a module.
CorrectIncorrect -
Question 5 of 10
5. Question
What keyword is used to rename a module while importing.
CorrectIncorrect -
Question 6 of 10
6. Question
File: greet.py
Code
>>> def say_hello(name):
>>> print(f”Hello {name}.”)
File: main.py
Code
>>> import greet
>>> greet.say_hello(“William”)
CorrectIncorrect -
Question 7 of 10
7. Question
File: minions.py
Code
>>> def fav_food():
>>> print(“Bananas”)
>>> if __name__ == “__main__”:
>>> fav_food()
File: run_minions.py
Code
>>> import minions
>>> minions.fav_food()
CorrectIncorrect -
Question 8 of 10
8. Question
File: Numbers.py
Code
>>> def number():
>>> num = 16
File: myfile.py
Code
>>> import Numbers
>>> Numbers.num
CorrectIncorrect -
Question 9 of 10
9. Question
File: fruit1.py
Code
>>> def fruit():
>>> print(“mango”)
File: fruit2.py
Code
>>> def fruit():
>>> print(“apple”)
File: myfruit.py
Code
>>> import fruit1 as fr
>>> import fruit2 as fr
>>> fr.fruit()
CorrectIncorrect -
Question 10 of 10
10. Question
File: Cars.py
Code
>>> def car():
>>> print(‘A car’)
File: main.py
Code
>>> from Cars import car
>>> def car():
>>> print(“Not a car”)
>>> car()
CorrectIncorrect