Problem-Solving Guide
Python syntax is only one part of programming. The goal of this course is to develop the ability to turn a requirement into a working algorithm.
The ten-minute first attempt
Before asking for help, spend ten focused minutes writing examples, identifying the inputs and outputs, and trying a small version of the problem. A failed attempt is useful evidence.
A reusable worksheet
Problem:
Inputs:
Outputs:
Examples:
Edge cases:
Steps in plain English:
Pseudocode:
Testing checklist
- Normal input
- Empty input, where applicable
- Smallest valid value
- Largest reasonable value
- Duplicate values
- Invalid input
- Unexpected spaces or letter case
When stuck
Read the problem again, reduce it to a smaller example, and solve the smaller example manually. Then compare your manual steps with your code. Use the hint only after making an attempt.