Write and execute efficient code involving events influenced by a defined count and/or sub-program and other control structures
30 tutor-authored questions for this Ontario curriculum expectation, ordered easiest to hardest, every one with a full worked solution. Work through all 30 with your weekly-lesson access code.
Sample: the first question, solved
Write a sub-program that calculates the area of a rectangle, then call it twice with different dimensions.
📘 Worked solution
✓Define "calculateArea(length,width): return length×width." Call 1: calculateArea(5,3)=15. Call 2: calculateArea(8,2)=16.
And one from the hard end
Design a code system using at least 2 sub-programs (perimeter and area), a defined-count loop, and a conditional, then explain how sub-programs make code more organized.
Solution shown after you try it in practice mode.
Work through all 30, easiest to hardest
Your Winny Score tracks you as the questions ramp up. Stuck on one? A real Winny Math tutor will walk you through it. First lesson free.
Start practicing