Other variationsTopCalculating Interest ExampleKnitting a scarf: another example of nested For loops

Knitting a scarf: another example of nested For loops

We can rewrite the knitting example from earlier in the term, replacing the while loops with nested for loops as follows:

Demo: Knitting


Other variationsTopCalculating Interest ExampleKnitting a scarf: another example of nested For loops