🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Modules and Libraries: all 14 questions

Quiz: Modules and Libraries · Question 5 of 14

Why should you NOT name your file random.py?

Why should you NOT name your file random.py?

  1. A.Python forbids it
  2. B.It hides the built-in random module when you import random
  3. C.It deletes the random module
  4. D.Files cannot have lowercase names
Answer & explanation

Correct answer: It hides the built-in random module when you import random

import random would load your file instead of the standard library module.

Can you get the rest right without peeking?

Take the timed Quiz: Modules and Libraries quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →