// This is the master plan for the for loops // [Single Loop] // Skip - Zero Iteration // // PassThrough - One Iteration // // Infinite // // [Many Iterations] - Normal case, not mentioned // Initialization // No // Assignment // [Single] // [Multiple] // Declaration // [Single] // [Multiple] // Same variable declared both before and in header, // and printed both in and after loop // // Condition // No // [Exists] // Arithmetic // [True] // [False] // Logical // [Short Circuit + Side Effect] // [No Short Circuit] // Assignment // [True] // [False] // Relational // Boundary does not change // Boundary changes // Declaration // [Single] // [Multiple] // Same variable declared both before and in header, // and printed both in and after loop // // // Action // Empty [statement] // Simple [statement] // Compound [statement] // Revises [LoopVar] // Before [Action] // After [Action] // [Does not revise LoopVar] // // Update // None // Up [Counting] // One // Many // Down [Counting] // One // Many // // PostLoop [Resume after loop] // // // Multiple [Back to back] // Dependent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Independent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Nested // Dependent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Independent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // ------------------------------------------------------------------- // Other factors that affect template hardness: // Loop body: // Just a print statement // a constant // the loop counter // a simple expression involving the loopvar // the loopvar, boundary value (when boundary is a variable or expression) // an expression involving the loopvar and boundary value (when // it is a variable) - No, too complicated // an if-else statement with different variables in the two clauses // // Note that the type of operator, and its subtypes determine hardness, // not learning objectives. // Number of iterations: // Zero iterations // < > // far off value // boundary value // <= >= // far off value // == // far off value // != // same value // Only One iteration // Multiple iterations // < > // far off value // <= >= // far off value // boundary value // == // same value // != // n-removed value // ---------------------------------------------------- // 100 // Iteration.Counter.Skip // Iteration.Counter.PassThrough // 150 // Iteration.Counter.Initialization.No // Iteration.Counter.Initialization.Assignment // Iteration.Counter.Initialization.Declaration // 225 // Iteration.Counter.Condition.No // Iteration.Counter.Condition.Arithmetic // Iteration.Counter.Condition.Logical // Iteration.Counter.Condition.Assignment // Iteration.Counter.Condition.Relational // Iteration.Counter.Condition.Declaration // Iteration.Counter.Condition.Changing // 400 // Iteration.Counter.Action.Empty // Iteration.Counter.Action.Simple // Iteration.Counter.Action.Compound // Iteration.Counter.Action.Changing.Before // Iteration.Counter.Action.Changing.After // 525 // Iteration.Counter.Update.No // Iteration.Counter.Update.Up.One // Iteration.Counter.Update.Up.Many // Iteration.Counter.Update.Down.One // Iteration.Counter.Update.Down.Many // 650 // Iteration.Counter.PostLoop // 675 // Iteration.Counter.Multiple.Dependent // [Up Counting] // [Down Counting] // Iteration.Counter.Multiple.Independent // [Up Counting] // [Down Counting] // // Iteration.Counter.Nested.Dependent // [Up Counting] // [Down Counting] // Iteration.Counter.Nested.Independent // [Up Counting] // [Down Counting] // break 800 // continue 825 // Iteration.Counter.Infinite 900 // // Up.One, Up.Many, Down.One, Down.Many are intertwined with the templates of most other learning objectives. // Could either // 1) elilminate all but Up.One for all other learning objectives and introduce them as templates for // Up.Many, Down.One, Down.Many // 2) Add a few token learning objectives for Up.One, Up.Many, Down.One, Down.Many, and // either designate the other learning objectives as meeting these objectives, are // provide credit for these learning objectives alongside the other learning objectives. // In Fall 2004, not creating any templates for or giving credit for these learning objectives. // // // Visual Basic works only with templates such that // condition is of the type var <= value or var >= value // update is of the type var = var op value // //************** FOR LOOPS ************************************************ // ------------------------------------------------------------------------ // Counter.Skip ************************************ 100 //Empty Loops *************************** 100 # 100 Counter.Skip > {(){;for( = ; > ; = - 1){<<;}}} > Type: output Hardness: 50 # 101 Counter.Skip > {(){;for( = ; == ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 102 Counter.Skip > {(){;for( = ; < ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 103 Counter.Skip > {(){;for( = ; >= ; = - 1){<<;<<;}}} > Type: output Hardness: 50 # 104 Counter.Skip > {(){;for( = ; != ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 105 Counter.Skip > {(){;for( = ; <= ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 106 Counter.Skip > {(){;=;for( = ; > ; = - 1){<<;<<;}}} > Type: output Hardness: 50 # 107 Counter.Skip > {(){;=;for( = ; == ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 108 Counter.Skip > {(){;=;for( = ; < ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 109 Counter.Skip > {(){;=;for( = ; >= ; = - 1){<<;<<;}}} > Type: output Hardness: 50 # 110 Counter.Skip > {(){;=;for( = ; != ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 111 Counter.Skip > {(){;=;for( = ; <= ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 112 Counter.Skip > {(){;for( = ; > ; = - 1){<<;}}} > Type: output Hardness: 60 # 113 Counter.Skip > {(){;for( = ; < ; = + 1){<<;}}} > Type: output Hardness: 60 # 114 Counter.Skip > {(){;for( = ; != ; = + 1){<<;}}} > Type: output Hardness: 60 // Introduced for the sake of Visual Basic # 115 Counter.Skip > {(){;=;for( = ; >= ; = - ){<<;<<;}}} > Type: output Hardness: 50 # 116 Counter.Skip > {(){;=;for( = ; <= ; = + ){<<;<<;}}} > Type: output Hardness: 50 // ------------------------------------------------------------------------ // Counter.PassThrough ************************************ 125 # 125 Counter.PassThrough > {(){=;for( = - 1; < ; = + 1){<<;}}} > Type: output Hardness: 50 # 126 Counter.PassThrough > {(){=;for( = + 1; > ; = - 1){<<;}}} > Type: output Hardness: 50 # 127 Counter.PassThrough > {(){;for( = ; == ; = + 1){<<;}}} > Type: output Hardness: 50 # 128 Counter.PassThrough > {(){;for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 60 # 129 Counter.PassThrough > {(){;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 60 # 130 Counter.PassThrough > {(){;for( = ; != ; = ){<<;}}} > Type: output Hardness: 50 # 131 Counter.PassThrough > {(){;for( = ; < ; = ){<<;}}} > Type: output Hardness: 50 # 132 Counter.PassThrough > {(){;for( = ; > 0; = - ){<<;}}} > Type: output Hardness: 60 # 133 Counter.PassThrough > {(){=;;for( = ; == ; = - 1){<<;<<;}}} > Type: output Hardness: 50 # 134 Counter.PassThrough > {(){;for( = ; <= ; = * 2){<<;}}} > Type: output Hardness: 50 # 135 Counter.PassThrough > {(){;=;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 50 # 136 Counter.PassThrough > {(){;=; = + 1;for( = ; != ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 137 Counter.PassThrough > {(){;=; = + 1;for( = ; < ; = + 1){<<;<<;}}} > Type: output Hardness: 50 # 138 Counter.PassThrough > {(){;=; = - 1;for( = ; > ; = - 1){<<;<<;}}} > Type: output Hardness: 50 # 139 Counter.PassThrough > {(){=;;for( = ; == ; = ){<<;<<;}}} > Type: output Hardness: 50 # 140 Counter.PassThrough > {(){;=;for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 60 # 141 Counter.PassThrough > {(){;=;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 50 # 142 Counter.PassThrough > {(){=;;for( = ; != ; = ){<<;<<;}}} > Type: output Hardness: 50 # 143 Counter.PassThrough > {(){;=;for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 60 # 144 Counter.PassThrough > {(){;=;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 50 # 145 Counter.PassThrough > {(){;=;for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 60 # 146 Counter.PassThrough > {(){;=;for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 50 // ------------------------------------------------------------------------ // Counter.Initialization.No ************************************ 150 // ------------------------------------------------------------------------ // Counter.Initialization.Assignment ************************************ 175 // ------------------------------------------------------------------------ // Counter.Initialization.Declaration ************************************ 200 // ------------------------------------------------------------------------ // Counter.Condition.No ************************************ 225 // ------------------------------------------------------------------------ // Counter.Condition.Arithmetic ************************************ 250 // ------------------------------------------------------------------------ // Counter.Condition.Logical ************************************ 275 // ------------------------------------------------------------------------ // Counter.Condition.Assignment ************************************ 300 // ------------------------------------------------------------------------ // Counter.Condition.Relational ************************************ 325 // Using a constant as boundary value, update by one # 325 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; < ; = + 1){<<;}}} > Type: output Hardness: 20 # 326 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; > ; = - 1){<<;}}} > Type: output Hardness: 50 # 327 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 20 # 328 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 50 # 329 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; != ; = + 1){<<;}}} > Type: output Hardness: 50 // Using a variable to hold boundary value, update by one # 330 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; < ; = + 1){<<;}}} > Type: output Hardness: 50 # 331 Counter.Condition.Relational ? Counter.Update.After > // {(){=;;for( = ; > ; = + 1){<<;}}} {(){;=;for( = ; > ; = - 1){<<;}}} > Type: output Hardness: 50 # 332 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; <= ; = + 1){<<;}}} // {(){=;;for( = ; <= ; = - 1){<<;}}} > Type: output Hardness: 60 # 333 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 60 # 334 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; != ; = + 1){<<;}}} // {(){;=;for( = ; != ; = + 1){<<;<<;}}} // Simplified for S08 > Type: output Hardness: 50 # 335 Counter.Condition.Relational ? Counter.Update.After > {(){=;;for( = ; != ; = - 1){<<;}}} // {(){=;;for( = ; != ; = - 1){<<;<<;}}} // Simplified for S08 > Type: output Hardness: 50 // Using a constant to hold boundary value, update by more than one # 336 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; < ; = + ){<<;}}} > Type: output Hardness: 20 # 337 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; > ; = - ){<<;}}} > Type: output Hardness: 50 # 338 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 20 # 339 Counter.Condition.Relational ? Counter.Update.After > {(){;for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 50 // Using a variable to hold boundary value, update by more than one # 340 Counter.Condition.Relational ? Counter.Update.After > {(){; = ;for( = ; < ; = + ){<<;}}} > Type: output Hardness: 50 # 341 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; > ; = - ){<<;}}} > Type: output Hardness: 50 # 342 Counter.Condition.Relational ? Counter.Update.After > // {(){=;;for( = ; <= ; = - ){<<;}}} {(){; = ;for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 60 # 343 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; >= ; = - ){<<;}}} // {(){=;;for( = ; >= ; = + ){<<;}}} > Type: output Hardness: 60 # 344 Counter.Condition.Relational ? Counter.Update.After > {(){;; = + * ;for( = ; != ; = + ){<<;}}} > Type: output Hardness: 70 # 345 Counter.Condition.Relational ? Counter.Update.After > // {(){=;;for( = + * ; != ; = - ){<<;}}} [,,,]{(){=;;for( = ; != ; = - ){<<;}}} > Type: output Hardness: 70 # 346 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; < ; = + ){<<;}}} > Type: output Hardness: 70 # 347 Counter.Condition.Relational ? Counter.Update.After > {(){;=;for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 70 // ------------------------------------------------------------------------ // Counter.Condition.Declaration ************************************ 350 // ------------------------------------------------------------------------ // Counter.Condition.Changing ************************************ 375 // NOT simplified for S08 since multiple outputs in the loop help student correctly understand behavior of loop // Loop variable and Boundary variable changing in the opposite directions by 1 # 375 Counter.Condition.Changing > {(){;=;for( = ; < ; = + 1){<<;<<; = - 1;}}} > Type: output Hardness: 60 # 376 Counter.Condition.Changing > {(){;=;for( = ; > ; = - 1){<<;<<; = + 1;}}} > Type: output Hardness: 60 # 377 Counter.Condition.Changing > {(){;=;for( = ; <= ; = + 1){<<;<<; = - 1;}}} > Type: output Hardness: 70 # 378 Counter.Condition.Changing > {(){;=;for( = ; >= ; = - 1){<<;<<; = + 1;}}} > Type: output Hardness: 70 # 379 Counter.Condition.Changing > // {(){=;=;for( = + 6 * ; != ; = - ){<<;<<; = + ;}}} [,]{(){=;=;for( = ; != ; = - ){<<;<<; = + ;}}} > Type: output Hardness: 60 // Loop variable and Boundary variable changing in the opposite directions by the same amount, not 1 # 380 Counter.Condition.Changing > {(){;=;for( = ; < ; = + ){<<;<<; = - ;}}} > Type: output Hardness: 70 # 381 Counter.Condition.Changing > {(){;=;for( = ; > ; = - ){<<;<<; = + ;}}} > Type: output Hardness: 70 # 382 Counter.Condition.Changing > {(){;=;for( = ; <= ; = + ){<<;<<; = - ;}}} > Type: output Hardness: 70 # 383 Counter.Condition.Changing > {(){;=;for( = ; >= ; = - ){<<;<<; = + ;}}} > Type: output Hardness: 70 # 384 Counter.Condition.Changing > // {(){=;=;for( = + 4 * ; != ; = - ){<<;<<; = + ;}}} [,,]{(){=;=;for( = ; != ; = - ){<<;<<; = + ;}}} > Type: output Hardness: 70 // Loop variable and Boundary variable changing in the same direction, but by different amounts # 385 Counter.Condition.Changing > {(){;=;for( = ; < ; = + ){<<;<<; = + 1;}}} > Type: output Hardness: 80 # 386 Counter.Condition.Changing > {(){;=;for( = ; <= ; = + ){<<;<<; = + 1;}}} > Type: output Hardness: 80 # 387 Counter.Condition.Changing > {(){;=;for( = ; > ; = - ){<<;<<; = - 1;}}} > Type: output Hardness: 80 # 388 Counter.Condition.Changing > {(){;=;for( = ; >= ; = - ){<<;<<; = - 1;}}} > Type: output Hardness: 80 // ------------------------------------------------------------------------ // Counter.Action.Empty ************************************ 400 // ------------------------------------------------------------------------ // Counter.Action.Simple ************************************ 425 // Using a constant as boundary value, update by one # 425 Counter.Action.Simple > {(){;for( = ; < ; = + 1)<<;}} > Type: output Hardness: 60 # 426 Counter.Action.Simple > {(){;for( = ; > ; = - 1)<<;}} > Type: output Hardness: 60 # 427 Counter.Action.Simple > {(){;for( = ; <= ; = + 1)<<;}} > Type: output Hardness: 60 # 428 Counter.Action.Simple > {(){;for( = ; >= ; = - 1)<<;}} > Type: output Hardness: 60 # 429 Counter.Action.Simple > {(){;for( = ; != ; = + 1)<<;}} > Type: output Hardness: 60 // Using a variable to hold boundary value, update by one # 430 Counter.Action.Simple > {(){;=;for( = ; < ; = + 1)<<; = - 1;}} > Type: output Hardness: 70 # 431 Counter.Action.Simple > {(){;=;for( = ; > ; = - 1)<<; = + 1;}} > Type: output Hardness: 70 # 432 Counter.Action.Simple > {(){;=;for( = ; <= ; = + 1)<<; = - 1;}} > Type: output Hardness: 80 # 433 Counter.Action.Simple > {(){;=;for( = ; >= ; = - 1)<<; = + 1;}} > Type: output Hardness: 80 # 434 Counter.Action.Simple ? Counter.PostLoop > {(){;=;for( = ; != ; = + 1)<<;<<;}} > Type: output Hardness: 70 # 435 Counter.Action.Simple ? Counter.PostLoop > {(){=;;for( = ; != ; = - 1)<<;<<;}} > Type: output Hardness: 70 // Using a constant to hold boundary value, update by more than one # 436 Counter.Action.Simple > {(){;for( = ; < ; = + )<<;}} > Type: output Hardness: 50 # 437 Counter.Action.Simple > {(){;for( = ; > ; = - )<<;}} > Type: output Hardness: 60 # 438 Counter.Action.Simple > {(){;for( = ; <= ; = + )<<;}} > Type: output Hardness: 50 # 439 Counter.Action.Simple > {(){;for( = ; >= ; = - )<<;}} > Type: output Hardness: 60 // Using a variable to hold boundary value, update by more than one # 440 Counter.Action.Simple > {(){;=;for( = ; < ; = + )<<; = - ;}} > Type: output Hardness: 70 # 441 Counter.Action.Simple > {(){;=;for( = ; > ; = - )<<; = + ;}} > Type: output Hardness: 70 # 442 Counter.Action.Simple > {(){;=;for( = ; <= ; = + )<<; = - ;}} > Type: output Hardness: 80 # 443 Counter.Action.Simple > {(){;=;for( = ; >= ; = - )<<; = + ;}} > Type: output Hardness: 80 # 444 Counter.Action.Simple ? Counter.PostLoop > // {(){; = + * ;for( = ; != ; = + )<<;<<;}} [,,,]{(){; = ;for( = ; != ; = + )<<;<<;}} > Type: output Hardness: 80 # 445 Counter.Action.Simple ? Counter.PostLoop > // {(){=;;for( = + * ; != ; = - )<<;<<;}} [,,,]{(){=;;for( = ; != ; = - )<<;<<;}} > Type: output Hardness: 80 # 446 Counter.Action.Simple ? Counter.PostLoop > {(){;=;for( = ; < ; = + )<<;<<;}} > Type: output Hardness: 80 # 447 Counter.Action.Simple ? Counter.PostLoop > {(){;=;for( = ; <= ; = + )<<;<<;}} > Type: output Hardness: 80 // ------------------------------------------------------------------------ // Counter.Action.Compound ************************************ 450 // ------------------------------------------------------------------------ // Counter.Action.Changing.Before ************************************ 475 // Counter loop being changed in the body, before the body // Using a constant as boundary value, update by one # 475 Counter.Action.Changing.Before > {(){;for( = ; < ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 20 # 476 Counter.Action.Changing.Before > {(){;for( = ; > ; = - 1){ = - 1;<<;}}} > Type: output Hardness: 50 # 477 Counter.Action.Changing.Before > {(){;for( = ; <= ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 20 # 478 Counter.Action.Changing.Before > {(){;for( = ; >= ; = - 1){ = - 1;<<;}}} > Type: output Hardness: 50 # 479 Counter.Action.Changing.Before > {(){; = + * 2;for( = ; != ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 50 // Using a variable to hold boundary value, update by one # 480 Counter.Action.Changing.Before > {(){;=;for( = ; < ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 50 # 481 Counter.Action.Changing.Before > {(){;=;for( = ; > ; = - 1){ = - 1;<<;}}} > Type: output Hardness: 50 # 482 Counter.Action.Changing.Before > {(){;=;for( = ; <= ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 60 # 483 Counter.Action.Changing.Before > {(){;=;for( = ; >= ; = - 1){ = - 1;<<;}}} > Type: output Hardness: 60 # 484 Counter.Action.Changing.Before > // {(){; = + 2 * ;for( = ; != ; = + 1){ = + 1;<<;<<;}}} // Simplified for S08 // {(){ = ; = ; = 2 * + ;for( = ; != ; = + 1){ = + 1;<<;}}} [,,]{(){ = ; = ;for( = ; != ; = + 1){ = + 1;<<;}}} > Type: output Hardness: 50 # 485 Counter.Action.Changing.Before > // {(){=;;for( = + 2 * ; != ; = - 1){ = - 1;<<;<<;}}} // Simplified for S08 // {(){=; = ;for( = 2 * + ; != ; = - 1){ = - 1;<<;}}} [,,]{(){=;;for( = ; != ; = - 1){ = - 1;<<;}}} > Type: output Hardness: 50 // Using a constant to hold boundary value, update by more than one # 486 Counter.Action.Changing.Before > {(){;for( = ; < ; = + ){ = + ;<<;}}} > Type: output Hardness: 20 # 487 Counter.Action.Changing.Before > {(){;for( = ; > ; = - ){ = - ;<<;}}} > Type: output Hardness: 50 # 488 Counter.Action.Changing.Before > {(){;for( = ; <= ; = + ){ = + ;<<;}}} > Type: output Hardness: 20 # 489 Counter.Action.Changing.Before > {(){;for( = ; >= ; = - ){ = - ;<<;}}} > Type: output Hardness: 50 // Using a variable to hold boundary value, update by more than one # 490 Counter.Action.Changing.Before > {(){; = ;for( = ; < ; = + ){ = + ;<<;}}} > Type: output Hardness: 50 # 491 Counter.Action.Changing.Before > {(){;=;for( = ; > ; = - ){ = - ;<<;}}} > Type: output Hardness: 50 # 492 Counter.Action.Changing.Before > {(){; = ;for( = ; <= ; = + ){ = + ;<<;}}} > Type: output Hardness: 60 # 493 Counter.Action.Changing.Before > {(){;=;for( = ; >= ; = - ){ = - ;<<;}}} > Type: output Hardness: 60 # 494 Counter.Action.Changing.Before > {(){;=;for( = ; < ; = + ){ = + ;<<;}}} > Type: output Hardness: 70 # 495 Counter.Action.Changing.Before > {(){;=;for( = ; <= ; = + ){ = + ;<<;}}} > Type: output Hardness: 70 // ------------------------------------------------------------------------ // Counter.Action.Changing.After ************************************ 500 // ------------------------------------------------------------------------ // Counter.Update.No ************************************ 525 // ------------------------------------------------------------------------ // Counter.Update.Before ************************************ 550 // ------------------------------------------------------------------------ // Do we need this? This is general case // Counter.Update.Up.One ************************************ 550 // ------------------------------------------------------------------------ // Counter.PostLoop ************************************ 650 // Using a constant as boundary value, update by one # 650 Counter.PostLoop > {(){;for( = ; < ; = + 1){<<;}<<;}} > Type: output Hardness: 30 # 651 Counter.PostLoop > {(){;for( = ; > ; = - 1){<<;}<<;}} > Type: output Hardness: 40 # 652 Counter.PostLoop > {(){;for( = ; <= ; = + 1){<<;}<<;}} > Type: output Hardness: 30 # 653 Counter.PostLoop > {(){;for( = ; >= ; = - 1){<<;}<<;}} > Type: output Hardness: 40 # 654 Counter.PostLoop > {(){;for( = ; != ; = + 1){<<;}<<;}} > Type: output Hardness: 30 // Using a variable to hold boundary value, update by one # 655 Counter.PostLoop > {(){;=;for( = ; < ; = + 1){<<;}<<;}} > Type: output Hardness: 30 # 656 Counter.PostLoop > // {(){=;;for( = ; > ; = + 1){<<;}<<;}} {(){;=;for( = ; > ; = - 1){<<;}<<;}} > Type: output Hardness: 30 # 657 Counter.PostLoop > {(){;=;for( = ; <= ; = + 1){<<;}<<;}} // {(){=;;for( = ; <= ; = - 1){<<;}<<;}} > Type: output Hardness: 40 # 658 Counter.PostLoop > {(){;=;for( = ; >= ; = - 1){<<;}<<;}} > Type: output Hardness: 40 # 659 Counter.PostLoop > {(){;=;for( = ; != ; = + 1){<<;}<<;}} // {(){;=;for( = ; != ; = + 1){<<;<<;}<<;}} // Simplified for S08 > Type: output Hardness: 30 # 660 Counter.PostLoop > {(){=;;for( = ; != ; = - 1){<<;}<<;}} // {(){=;;for( = ; != ; = - 1){<<;<<;}<<;}} // Simplified for S08 > Type: output Hardness: 40 // Using a constant to hold boundary value, update by more than one # 661 Counter.PostLoop > {(){;for( = ; < ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 662 Counter.PostLoop > {(){;for( = ; > ; = - ){<<;}<<;}} > Type: output Hardness: 40 # 663 Counter.PostLoop > {(){;for( = ; <= ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 664 Counter.PostLoop > {(){;for( = ; >= ; = - ){<<;}<<;}} > Type: output Hardness: 40 // Using a variable to hold boundary value, update by more than one # 665 Counter.PostLoop > {(){;=;for( = ; < ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 666 Counter.PostLoop > {(){;=;for( = ; > ; = - ){<<;}<<;}} > Type: output Hardness: 40 # 667 Counter.PostLoop > {(){;=;for( = ; <= ; = + ){<<;}<<;}} // {(){=;;for( = ; <= ; = - ){<<;}<<;}} > Type: output Hardness: 40 # 668 Counter.PostLoop > {(){;=;for( = ; >= ; = - ){<<;}<<;}} // {(){=;;for( = ; >= ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 669 Counter.PostLoop > // {(){; = + * ;for( = ; != ; = + ){<<;}<<;}} [,,,]{(){; = ;for( = ; != ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 670 Counter.PostLoop > // {(){=; = * ;for( = + ; != ; = - ){<<;}<<;}} [,,,]{(){=; = ;for( = + ; != ; = - ){<<;}<<;}} > Type: output Hardness: 40 # 671 Counter.PostLoop > {(){;=;for( = ; < ; = + ){<<;}<<;}} > Type: output Hardness: 30 # 672 Counter.PostLoop > {(){;=;for( = ; <= ; = + ){<<;}<<;}} > Type: output Hardness: 30 // ------------------------------------------------------------------------ // Counter.Multiple.Dependent ************************************ 675 // [Up Counting] // [Down Counting] // 2 loops // UpUp - Update by 1 vs many - use first loop variable's value as second loop's start value/end value // UpDown - Update by 1 vs many // DownUp - Update by 1 vs many // DownDown - Update by 1 vs many // ********************** Up X Up X update by 1 ********************** # 675 Counter.Multiple.Dependent > {(){;for( = ; < ; = + 1){<<;}for(; <= ; = + 1){<<;}}} > Type: output Hardness: 80 # 676 Counter.Multiple.Dependent > // {(){;for( = ; < ; = + 1){<<;};for( = ; <= ; = + 1){<<;}}} - Till Fall 2007 {(){;for( = ; <= ; = + 1){<<;};for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 80 // ********************** Up X Up X Update by many ********************** # 677 Counter.Multiple.Dependent > {(){;for( = ; < ; = + ){<<;}for(; <= ; = + ){<<;}}} > Type: output Hardness: 80 # 678 Counter.Multiple.Dependent > {(){;for( = ; < ; = + ){<<;};for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 80 // ********************** Up X Down X update by 1 ********************** # 679 Counter.Multiple.Dependent > {(){;for( = ; < ; = + 1){<<;}for(; >= ; = - 1){<<;}}} > Type: output Hardness: 80 # 680 Counter.Multiple.Dependent > // {(){;for( = ; < ; = + 1){<<;};for( = ; >= ; = - 1){<<;}}} - Till Fall 2007 {(){;for( = ; <= ; = + 1){<<;};for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 80 // ********************** Up X Down X Update by many ********************** # 681 Counter.Multiple.Dependent > {(){;for( = ; < ; = + ){<<;}for(; >= ; = - ){<<;}}} > Type: output Hardness: 80 # 682 Counter.Multiple.Dependent > {(){;for( = ; < ; = + ){<<;};for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 80 // ********************** Down X Up X Update by 1 ********************** # 683 Counter.Multiple.Dependent > {(){;for( = ; > ; = - 1){<<;}for(; <= ; = + 1){<<;}}} > Type: output Hardness: 80 # 684 Counter.Multiple.Dependent > // {(){;for( = ; >= ; = - 1){<<;};for( = ; < ; = + 1){<<;}}} - Till Fall 2007 {(){;for( = ; >= ; = - 1){<<;};for( = ; <= ; = + 1){<<;}}} > Type: output Hardness: 80 // ********************** Down X Up X Update by many ********************** # 685 Counter.Multiple.Dependent > {(){;for( = ; > ; = - ){<<;}for(; <= ; = + ){<<;}}} > Type: output Hardness: 80 # 686 Counter.Multiple.Dependent > {(){;for( = ; >= ; = - ){<<;};for( = ; < ; = + ){<<;}}} > Type: output Hardness: 80 // ********************** Down X Down X Update by 1 ********************** # 687 Counter.Multiple.Dependent > {(){;for( = ; > ; = - 1){<<;}for(; >= ; = - 1){<<;}}} > Type: output Hardness: 80 # 688 Counter.Multiple.Dependent > // {(){;for( = ; > ; = - 1){<<;};for( = ; >= ; = - 1){<<;}}} - Till Fall 2007 {(){;for( = ; >= ; = - 1){<<;};for( = ; >= ; = - 1){<<;}}} > Type: output Hardness: 80 // ********************** Down X Down X Update by many ********************** # 689 Counter.Multiple.Dependent > {(){;for( = ; > ; = - ){<<;}for(; >= ; = - ){<<;}}} > Type: output Hardness: 80 # 690 Counter.Multiple.Dependent > {(){;for( = ; > ; = - ){<<;};for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 80 // ********************** 3-levels ********************** # 691 Counter.Multiple.Dependent > {(){;for( = ; < ; = + 1){<<;}for(; < ; = + 2){<<;}for(; < ; = + 3){<<;}}} > Type: output Hardness: 90 # 692 Counter.Multiple.Dependent > {(){;for( = ; > ; = - 3){<<;}for(; > ; = - 2){<<;}for(; > ; = - 1){<<;}}} > Type: output Hardness: 90 // ***************** Introduced for the benefit of Visual Basic ******************** // Trivial modification of 677 # 693 Counter.Multiple.Dependent > {(){;for( = ; <= ; = + ){<<;};for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 80 // Trivial modification of 681 # 694 Counter.Multiple.Dependent > {(){;for( = ; <= ; = + ){<<;};for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 80 // Trivial modification of 685 # 695 Counter.Multiple.Dependent > {(){;for( = ; >= ; = - ){<<;};for( = ; <= ; = + ){<<;}}} > Type: output Hardness: 80 // Trivial modification of 689 # 696 Counter.Multiple.Dependent > {(){;for( = ; >= ; = - ){<<;};for( = ; >= ; = - ){<<;}}} > Type: output Hardness: 80 // ------------------------------------------------------------------------ // Counter.Multiple.Independent ************************************ 700 // [Up Counting] // [Down Counting] // ------------------------------------------------------------------------ // Counter.Nested.Dependent ************************************ 725 // [Up Counting] // [Down Counting] // 2 loops nested // UpUp - Update by 1 vs many - use outside loop variable's value as inside loop's start value/end value/update value // UpDown - Update by 1 vs many // DownUp - Update by 1 vs many // DownDown - Update by 1 vs many // Up X Up X update by 1 # 725 Counter.Nested.Dependent > // {(){;;for( = ; < ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 726 Counter.Nested.Dependent > {(){;;for( = ; < ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 // Up X Up X Update by many # 727 Counter.Nested.Dependent > {(){;;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 728 Counter.Nested.Dependent > // {(){;;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 729 Counter.Nested.Dependent > {(){;;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 90 // Up X Down X update by 1 # 730 Counter.Nested.Dependent > // {(){;;for( = ; < ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 731 Counter.Nested.Dependent > {(){;;for( = ; < ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 // Up X Down X Update by many # 732 Counter.Nested.Dependent > {(){;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 733 Counter.Nested.Dependent > {(){;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 734 Counter.Nested.Dependent > // {(){;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} {(){;;for( = ; <= ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 90 // Down X Up X Update by 1 # 735 Counter.Nested.Dependent > {(){;;for( = ; > ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 736 Counter.Nested.Dependent > // {(){;;for( = ; > ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 // Down X Up X Update by many # 737 Counter.Nested.Dependent > {(){;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 738 Counter.Nested.Dependent > {(){;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 739 Counter.Nested.Dependent > // {(){;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 90 // Down X Down X Update by 1 # 740 Counter.Nested.Dependent > {(){;;for( = ; > ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 741 Counter.Nested.Dependent > // {(){;;for( = ; > ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 // Down X Down X Update by many # 742 Counter.Nested.Dependent > {(){;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 743 Counter.Nested.Dependent > {(){;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 744 Counter.Nested.Dependent > // {(){;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 90 //3-levels # 745 Counter.Nested.Dependent > {(){;;;for( = ; < ; = + 1){<<;for( = ; < ; = + 1){<<;for( = ; < ; = + 1){<<;}}}}} // {(){;;;for( = ; < ; = + 1){for( = ; < ; = + 1){for( = ; < ; = + 1){<<;<<;<<;}}}}} // Simplified for S08 > Type: output Hardness: 90 # 746 Counter.Nested.Dependent > {(){;;;for( = ; > ; = - 1){<<;for( = ; > ; = - 1){<<;for( = ; > ; = - 1){<<;}}}}} // {(){;;;for( = ; > ; = - 1){for( = ; > ; = - 1){for( = ; > ; = - 1){<<;<<;<<;}}}}} // Simplified for S08 > Type: output Hardness: 90 // ------------------------------------------------------------------------ // Counter.Nested.Independent ************************************ 750 // [Up Counting] // [Down Counting] // 2 loops nested // UpUp - Update by 1 vs many - 2 constants for bounds, same constant for bounds, 2 variables for bounds both same // UpDown - Update by 1 vs many // DownUp - Update by 1 vs many // DownDown - Update by 1 vs many // Up X Up X update by 1 # 750 Counter.Nested.Independent > // {(){;;for( = ; < ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 751 Counter.Nested.Independent > {(){;;for( = ; < ; = + 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 752 Counter.Nested.Independent > {(){;;=;for( = ; < ; = + 1){<<;for( = ; < ; = + 1){<<;}}}} > Type: output Hardness: 80 // Up X Up X Update by many # 753 Counter.Nested.Independent > {(){;;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 754 Counter.Nested.Independent > // {(){;;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 755 Counter.Nested.Independent > {(){;;=;=;for( = ; < ; = + ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 // Up X Down X update by 1 # 756 Counter.Nested.Independent > {(){;;for( = ; < ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 757 Counter.Nested.Independent > {(){;;for( = ; < ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 758 Counter.Nested.Independent > // {(){;;=;=;for( = ; < ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} - Till Fall 2007 {(){;;=;=;for( = ; <= ; = + 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 // Up X Down X Update by many # 759 Counter.Nested.Independent > {(){;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 760 Counter.Nested.Independent > // {(){;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} - Till Fall 2007 {(){;;for( = ; <= ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 761 Counter.Nested.Independent > {(){=;=;=;;;for( = ; < ; = + ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 // Down X Up X Update by 1 # 762 Counter.Nested.Independent > // {(){;;for( = ; > ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 763 Counter.Nested.Independent > {(){;;for( = ; > ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 # 764 Counter.Nested.Independent > {(){;;=;=;for( = ; > ; = - 1){<<;for( = ; <= ; = + 1){<<;}}}} > Type: output Hardness: 80 // Down X Up X Update by many # 765 Counter.Nested.Independent > {(){=;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 766 Counter.Nested.Independent > // {(){;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 # 767 Counter.Nested.Independent > {(){=;=;=;;;for( = ; > ; = - ){<<;for( = ; <= ; = + ){<<;}}}} > Type: output Hardness: 80 // Down X Down X Update by 1 # 768 Counter.Nested.Independent > {(){;;for( = ; > ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 769 Counter.Nested.Independent > {(){;;for( = ; > ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 # 770 Counter.Nested.Independent > // {(){;;=;=;for( = ; > ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} - Till Fall 2007 {(){;;=;=;for( = ; >= ; = - 1){<<;for( = ; >= ; = - 1){<<;}}}} > Type: output Hardness: 80 // Down X Down X Update by many # 771 Counter.Nested.Independent > {(){;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 772 Counter.Nested.Independent > // {(){;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} - Till Fall 2007 {(){;;for( = ; >= ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 # 773 Counter.Nested.Independent > {(){=;=;=;;;for( = ; > ; = - ){<<;for( = ; >= ; = - ){<<;}}}} > Type: output Hardness: 80 //3-levels # 774 Counter.Nested.Independent > {(){;;;for( = ; < ; = + 1){<<;for( = ; < ; = + 1){<<;for( = ; < ; = + 1){<<;}}}}} // {(){;;for( = ; < ; = + 1){;for( = ; < ; = + 1){for( = ; < ; = + 1){<<;<<;<<;}}}}} // Simplified for S08 > Type: output Hardness: 90 //3-levels # 775 Counter.Nested.Independent > {(){;;;for( = ; > ; = - 1){<<;for( = ; > ; = - 1){<<;for( = ; > ; = - 1){<<;}}}}} // {(){;;for( = ; > ; = - 1){;for( = ; > ; = - 1){for( = ; > ; = - 1){<<;<<;<<;}}}}} // Simplified for S08 > Type: output Hardness: 90 // -------------------------------------------------------------------------- // Templates here are for demonstration purposes // Included at the end so that regular practice does not pick up these templates // How to enter 2 outputs # 90 Demonstration > {(){=;<<;=;<<;<< - ;}} > Type: output Hardness: 10 // How to enter multiple outputs from the same line # 91 Demonstration > {(){;for( = 1; <= 2; = + 1){<<;}}} > Type: output Hardness: 10 // How to enter multiple outputs from alternate lines # 92 Demonstration > {(){;; = 5;for( = 1; <= 2; = + 1){<<;<<;}}} > Type: output Hardness: 10 // --------------------------------------------------------------------------