Combining Dissect the Code with Real-Life Scenario to build deep understanding + real skill.
Make sure the AI understand
How they should response
Here’s how we’ll do it:
- I’ll give you a real-life need (like an app feature)
- We’ll write the code step by step
- I’ll pause and explain each line, breaking it down clearly
- Then you try adjusting it or applying it slightly differently
Scenario: Show Even Numbers in a Shopping App
Problem:
You have a list of item IDs, and you want to show only the even-numbered items on screen.
Step 1: Setup a List
void main() {
List<int> itemIds = [101, 102, 103, 104, 105, 106];
}
Explanation:
- This list could represent products in your shop
- Each number is a unique item ID
Step 2: Filter Even IDs