← All topics
Quiz: Modules and Libraries: questions with answers
14 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does from math import sqrt let you write?
- Q2. What does this print? (code)
- Q3. What is the purpose of if name == "main":?
- Q4. Which command creates a virtual environment named .venv?
- Q5. Why should you NOT name your file random.py?
- Q6. What does this print? (code)
- Q7. Which command installs a third-party package?
- Q8. What does import numpy as np do?
- Q9. What does this print? (code)
- Q10. What does this print? (code)
- Q11. What does this print? (code)
- Q12. Why do programs call random.seed(1) while testing?
- Q13. What is the main reason to use a virtual environment?
- Q14. What does this print? (code)