🛠️Software Library
Also known as Library, Code Library
Ready-made code for one kind of job. You load it and call it from your code.
Think of it like
Think of it like a box of ready-made Lego parts. You grab a wheel instead of building one.
Example
Emma needs to read a spreadsheet in Python. Instead of writing 500 lines, she loads a library and calls one function.
Why it matters
Libraries save months of work. They are also tested by thousands of other users.
Definition
Example code
python
import random
print(random.choice(["red", "blue", "green"]))Common mistake
Key takeaways
- 1Reuse, not rewrite. Someone already solved this problem.
- 2You call it. Your code decides when it runs.
- 3One job. Each library covers one kind of task.