🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. What does from math import sqrt let you write?
  2. Q2. What does this print? (code)
  3. Q3. What is the purpose of if name == "main":?
  4. Q4. Which command creates a virtual environment named .venv?
  5. Q5. Why should you NOT name your file random.py?
  6. Q6. What does this print? (code)
  7. Q7. Which command installs a third-party package?
  8. Q8. What does import numpy as np do?
  9. Q9. What does this print? (code)
  10. Q10. What does this print? (code)
  11. Q11. What does this print? (code)
  12. Q12. Why do programs call random.seed(1) while testing?
  13. Q13. What is the main reason to use a virtual environment?
  14. Q14. What does this print? (code)