Find Mistake: Wrong Import Name
Find the Mistake Easy
Question
This code raises a ModuleNotFoundError. What is wrong?
Code
import Randint
n = Randint.randint(1, 10)
Hint
Check the spelling and case of the module name.
Explanation
The module name is misspelled. The correct module is random, not Randint. The fix is: import random and then n = random.randint(1, 10). Module names are case-sensitive.
Related Resources
Related Lessons
- Modules
Importing modules.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.