Write and execute efficient code involving events influenced by a defined count and/or sub-program and other control structures
10 tutor-authored questions for this Ontario curriculum expectation, ordered easiest to hardest — every one with a full worked solution. Work through them free, no account needed.
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
Write code with a defined-count loop (repeat exactly 5 times) that calls a sub-program to generate a random number each time.
Solution shown after you try it in practice mode.
Work through all 10, 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