Q1. Why are functions useful in Python projects?
- They make code reusable and easier to manage
- They delete the need for variables
- They only work for math
- They make code slower in every case
Reveal answer
Answer: They make code reusable and easier to manage
Functions help organize code into reusable parts, which improves readability and maintainability.
Q2. A function can return a value to the rest of the program.
- True
- False
Reveal answer
Answer: True
Return values let other parts of the code use the result of the function.
Q3. What does import do?
- Deletes a file
- Brings code from another module into your program
- Starts a loop
- Changes a string into a number
Reveal answer
Answer: Brings code from another module into your program
Import lets you reuse code that lives in another file or built-in library.