Friday, June 1, 2012

Subtraction worksheet

A somewhat irrelevant post. I had to quickly produce a sheet of 100 random subtraction drills for my 2nd grader. I can think of 10 or 20 ways to make this more compact and useful.:


0..19 | % {write "$(get-random -max 21 -min 14) - $(get-random -max 6 -min 0)"} | out-file mixed100.txt
0..19 | % {write "$(get-random -max 16 -min 9) - $(get-random -max 6 -min 0) = "} | out-file -append mixed100.txt
0..19 | % {write "$(get-random -max 11 -min 6) - $(get-random -max 6 -min 0) = "} | out-file -append mixed100.txt
0..19 | % {write "$(get-random -max 21 -min 14) - $(get-random -max 11 -min 6) = "} | out-file -append mixed100.txt
0..19 | % {write "$(get-random -max 15 -min 9) - $(get-random -max 9 -min 3) = "} | out-file -append mixed100.txt



PS C:\Windows\system32> more mixed100.txt
19 - 3 =
16 - 5 =
19 - 1 =
18 - 5 =
18 - 2 =
17 - 1 =
16 - 0 =
14 - 0 =
...

No comments: