Python Functions · Easier Middle School Practice (Apr 25)
30 easier practice questions for middle school students: creating functions, using parameters, return values, if/else inside functions, for loops, iterating lists and dicts.
Python Functions
30 Easier Practice Questions for Middle School Students
This notebook is similar to the previous function practice, but easier for students to complete independently.
What students will practice
1. Creating Python functions from scratch. 2. Using parameters. 3. Returning values with return. 4. Using if / else. 5. Using for loops. 6. Iterating through lists and dictionaries. 7. Solving simple practical problems.
Important Direction
For each question, students must write the full function themselves.
Some questions provide sample data in the Python code cell. Use that data to test your function.
Do not copy the expected output as your answer. Write Python code that produces the expected output.