// Syntax: // Comment for reader's benefit, not parsed // # Template Number - +100 for each new type of problem, +10 for each new subtype // Learning Objective(s) for this template - when this template should be used // ? // If student gets the answer right, what OTHER objectives should get credit // Usually, counterpoint to the point of the error, say allocation for missing // deallocation, Declaration for out of scope error, assignment for incorrect // referencing, etc. // Make sure there is no overlap between this and antecedents! // : // If student gets the answer wrong, what OTHER objectives should get discredit // Make sure there is no overlap between this and antecedents! // > // The template itself, no double quotes, preceded and succeeded by a single > // > // Type: debug / output / code / expression // Hardness: The student's correct percentage up to which this template will be used // Note: Syntax for learning objectives (in antecedent, ifCorrect, ifWrong) // is dot.separated, with {,} to represent alternates. // e.g., a.{b,c} is a.b and a.c // This is NOT graph structured, i.e., a,{b,c}.d is not accounted for to mean // a.b.d or a.c.d // Base Hardness values: // Declaration: 10 // Initialization, Assignment: 20 // Referencing: 30 // TwoDim: +10 for all of the above // 200 // Array.OneDim.Initialization.Complete.Correct ------------ 6 templates // 250 // Array.OneDim.Initialization.Incomplete ------------------ 6 templates // // 300 // Array.OneDim.Assignment.Random ------------------------- 9 templates // includes simple, compound, increment, decrement etc. // 325 // Array.OneDim.Assignment.Systematic ---------------------- 18 templates // illustrates that a variable can hold only one value, non-destructive read // 375 // Array.OneDim.Assignment.Self Referential ---------------- 7 templates // // 400 // Array.OneDim.Referencing.Random ------------------------- // 425 // Array.OneDim.Referencing.Systematic --------------------- 24 templates // includes expression not affecting value of a variable, // 450 // Array.OneDim.Referencing.Uninitialized // // 500 // Array.OneDim.Subscript.Expression // 525 // Array.OneDim.Subscript.Out of Bounds // // // This does not apply to Java or C# // 600 // Array.OneDim.Parameter.Aggregate.Reference // 625 // Array.OneDim.Parameter.Aggregate.Value // 650 // Array.OneDim.Parameter.Element // POSSIBLY CODE-WRITING TEMPLATES: // 100 // Array.OneDim.Declaration.Correct // // 700 // Array.OneDim.Incomplete use // 725 // Array.OneDim.Lockstep // 750 // Array.OneDim.BinSort // UNNECESSARY LEARNING OBJECTIVES for One-Dim arrays // 125 // Array.OneDim.Declaration.Scope.Correct // including multiple scopes with multiple vars of same name // 150 // Array.OneDim.Declaration.Scope.Accessing variable out of its scope // 175 // Array.OneDim.Declaration.Accessing variable before declaring it // // 225 // Array.OneDim.Initialization.Complete.Not specifying size in the declaration of the array // // Cannot really test this since we display array of the correct size. // UNLESS I USE MULTIPLE-CHOICE AS PROBLEM TYPE AND ASK FOR SIZE OF ARRAY // // 275 // Array.OneDim.Initialization.Missing braces in array initialization // 300 // Array.OneDim.Initialization.Too many initializers // // 425 // Array.OneDim.Assignment.Coercion // 450 // Array.OneDim.Assignment.Assigning an element of the wrong data type // 475 // Array.OneDim.Assignment.Missing brackets [] in the statement // // Array.OneDim.Subscript.Constant // Array.OneDim.Subscript.Variable // 625 // Array.OneDim.Referencing.Missing brackets [] in the statement // // Multi-Dimensional // Declaration // Initialization // Assignment // Element // Aggregate // Referencing // Element // Aggregate // // // -------------------------------------------------------------------------- // IMPORTANT NOTE: IT SEEMS RANDOM CONSTANTS IN ARRAY INITIALIZERS ARE EVALUATED // AFTER RANDOM CONSTANTS ELSEWHERE IN THE PROGRAM. SO, IF WE USE THE SAME RANDOM CONSTANT // IN ARRAY INITIALIZERS AS WELL AS ELSEWHERE IN THE PROGRAM, MAKE SURE THE CONSTRAINTS // ARE SPECIFIED WHEREVER RANDOM CONSTANTS ARE USED IN THE PROGRAM. // 200 // Array.OneDim.Initialization.Complete.Correct // initialization values all the same # 200 Array.OneDim.Initialization.Complete.Correct > {(){ [6] = { ,,,,, }; << []; }} > Type: state Hardness: 10 // initialization values counting up, contiguous # 201 Array.OneDim.Initialization.Complete.Correct > {(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 15 // initialization values counting up, non-contiguous # 202 Array.OneDim.Initialization.Complete.Correct > {(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // NOTE: SPACE BEFORE 1 NECESSARY, ELSE, EXPRESSION TREATED AS R1 -1 RATHER THAN R1 - 1 // initialization values counting down, contiguous # 203 Array.OneDim.Initialization.Complete.Correct > {(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 15 // initialization values counting down, non-contiguous # 204 Array.OneDim.Initialization.Complete.Correct > {(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values increasing, multiples of 10 # 205 Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values increasing, multiples of 10 # 206 Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values decreasing, multiples of 10 # 207 Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values decreasing, multiples of 10 # 208 Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; << []; }} > Type: state Hardness: 20 // // To test state of primitive variables // // Works correctly with or without error-flagging // # 223 // Array.OneDim.Initialization.Complete.Correct // > // {(){ // = ; // << ; // = + ; // << ; // = ; // << ; // = - ; // << ; // = ; // << ; // = / ; // << ; // }} // > // Type: state // Hardness: 10 // // To test state of primitive variables // // To work correctly, use a new tell before each ask, // // Otherwise, it will use the same tell for all asks // # 224 // Array.OneDim.Initialization.Complete.Correct // > // {(){ // = ; // << ; // = + ; // << ; // = - ; // << ; // = / ; // << ; // }} // > // Type: state // Hardness: 10 // -------------------------------------------------------------------------- // IMPORTANT NOTE: IT SEEMS RANDOM CONSTANTS IN ARRAY INITIALIZERS ARE EVALUATED // AFTER RANDOM CONSTANTS ELSEWHERE IN THE PROGRAM. SO, IF WE USE THE SAME RANDOM CONSTANT // IN ARRAY INITIALIZERS AS WELL AS ELSEWHERE IN THE PROGRAM, MAKE SURE THE CONSTRAINTS // ARE SPECIFIED WHEREVER RANDOM CONSTANTS ARE USED IN THE PROGRAM. // THE FOLLOWING TEMPLATES DO NOT APPLY TO JAVA/C# // HOWEVER, ARRAYS ARE CREATED FOR JAVA/C3 OF THE SAME SIZE AS INITIALIZER LIST // IGNORING THE SIZE SPECIFIED FOR THE ARRAY // FOR THE BENEFIT OF C++, WE PRINT AN ELEMENT THAT IS DEFAULT-INITIALIZED // FOR JAVA/C#, THIS WOULD RESULT IN OUT-OF-BOUNDS ERROR // BUT, THESE ARE STATE PROBLEMS, SO ERRORS ARE IGNORED. // BE THAT AS IT MAY, AVOID THESE TEMPLATES FOR JAVA/C# // initialization values all the same # 250 Array.OneDim.Initialization.Incomplete > {(){ [] = { ,,,,, }; << []; }} > Type: state Hardness: 10 // initialization values counting up, contiguous # 251 Array.OneDim.Initialization.Incomplete > {(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 15 // initialization values counting up, non-contiguous # 252 Array.OneDim.Initialization.Incomplete > {(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // NOTE: SPACE BEFORE 1 NECESSARY, ELSE, EXPRESSION TREATED AS R1 -1 RATHER THAN R1 - 1 // initialization values counting down, contiguous # 253 Array.OneDim.Initialization.Incomplete > {(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 15 // initialization values counting down, non-contiguous # 254 Array.OneDim.Initialization.Incomplete > {(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values increasing, multiples of 10 # 255 Array.OneDim.Initialization.Incomplete > []{(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values increasing, multiples of 10 # 256 Array.OneDim.Initialization.Incomplete > []{(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values decreasing, multiples of 10 # 257 Array.OneDim.Initialization.Incomplete > []{(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // initialization values decreasing, multiples of 10 # 258 Array.OneDim.Initialization.Incomplete > []{(){ [] = { , , , , , }; << []; }} > Type: state Hardness: 20 // -------------------------------------------------------------------------- // 300 // Array.OneDim.Assignment.Random // random assignment, some elements, const subscript, const value # 300 Array.OneDim.Assignment.Random > {(){ []; [] = ; [] = ; [] = ; }} > Type: state Hardness: 20 // random assignment, some elements, const subscript, expression value # 301 Array.OneDim.Assignment.Random > {(){ []; = ; [] = + 1; [] = ; [] = - 1; }} > Type: state Hardness: 25 // random assignment, some elements, const subscript, expression value # 302 Array.OneDim.Assignment.Random > {(){ []; = ; = ; [] = ; [] = ; [] = - ; }} > Type: state Hardness: 30 // random assignment, some elements, const subscript, expression value # 303 Array.OneDim.Assignment.Random > {(){ []; = ; [] = ; [] = * 10; [] = * 100; }} > Type: state Hardness: 30 // random assignment, some elements, var subscript, const value # 310 Array.OneDim.Assignment.Random > {(){ []; = ; [] = ; = ; [] = ; = ; [] = ; }} > Type: state Hardness: 25 // random assignment, some elements, var subscript, variable value # 311 Array.OneDim.Assignment.Random > {(){ []; = ; [] = ; = ; [] = ; = ; [] = ; }} > Type: state Hardness: 30 // random assignment, some elements, var subscript, variable value # 312 Array.OneDim.Assignment.Random > {(){ []; = ; = ; = ; [] = ; [] = ; [] = ; }} > Type: state Hardness: 30 // random assignment, some elements, var subscript, expression value # 313 Array.OneDim.Assignment.Random > {(){ []; = ; [] = * ; = ; [] = * 2; = ; [] = + 2; }} > Type: state Hardness: 35 // // Used to test whether "No Changes" is marked as correct - YES // // random assignment, some elements, var subscript, expression value // # 314 // Array.OneDim.Assignment.Random // > // {(){ // [] = {1,2,3,4,5,6,7,8}; // = ; // << []; // = ; // << []; // = ; // << []; // }} // > // Type: state // Hardness: 35 // ---------------------------------------------------------------------- // 325 // Array.OneDim.Assignment.Systematic // systematic assignment, some elements (first few), var subscript, const value # 325 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 30 // systematic assignment, some elements (last few), var subscript, const value # 326 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 30 // systematic assignment, some elements (middle few), var subscript, const value # 327 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 35 // systematic assignment, some elements (alternating few), var subscript, const value # 328 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + ) { [] = ; } << []; }} > Type: state Hardness: 40 // systematic assignment, all elements, var subscript, const value - counting up # 329 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 30 // systematic assignment, all elements, var subscript, const value - counting down # 330 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; >= 0; = - 1 ) { [] = ; } << []; }} > Type: state Hardness: 40 // systematic assignment, some elements (first few), var subscript, var value # 331 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 40 // systematic assignment, some elements (last few), var subscript, var value # 332 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 40 // systematic assignment, some elements (middle few), var subscript, var value # 333 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 45 // systematic assignment, some elements (alternating few), var subscript, var value # 334 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + ) { [] = ; } << []; }} > Type: state Hardness: 50 // systematic assignment, all elements, var subscript, var value - counting up # 335 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; }} > Type: state Hardness: 40 // systematic assignment, all elements, var subscript, var value - counting down # 336 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; >= 0; = - 1 ) { [] = ; } << []; }} > Type: state Hardness: 50 // systematic assignment, some elements (first few), var subscript, expr value # 341 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = + 1; } << []; }} > Type: state Hardness: 50 // systematic assignment, some elements (last few), var subscript, expr value # 342 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = - 1; } << []; }} > Type: state Hardness: 50 // systematic assignment, some elements (middle few), var subscript, expr value # 343 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = ; < ; = + 1 ) { [] = * 2; } << []; }} > Type: state Hardness: 55 // systematic assignment, some elements (alternating few), var subscript, expr value # 344 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + ) { [] = + ; } << []; }} > Type: state Hardness: 60 // systematic assignment, all elements, var subscript, expr value - counting up # 345 Array.OneDim.Assignment.Systematic > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 10; } << []; }} > Type: state Hardness: 50 // systematic assignment, all elements, var subscript, expr value - counting down # 346 Array.OneDim.Assignment.Systematic > {(){ []; = ; for( = - 1; >= 0; = - 1 ) { [] = + 10; } << []; }} > Type: state Hardness: 60 // ------------------------------------------------------------------------------------ // Initialization - NO, gives away answers to initialization problems, and size must be static // Systematic assignment to all elements, of a constant or a variable // followed by a tell // followed by 3 random self-referential assignments // in terms of same element, next element up/down, next element up/down in expression // followed by an ask // // ALSO give credit for random assignment, random referencing // // // 375 // Array.OneDim.Assignment.Self Referential // random assignment, some elements, self-reference to same element in expression # 375 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; [] = [] + 3; [] = [] + 2; [] = [] + 1; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to same element in expression # 376 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; [] = [] + ; [] = [] + ; [] = [] + ; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to same element in expression # 377 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; [] = [] * 2; [] = [] * 10; [] = [] * 100; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to same element in expression # 378 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = + 1; } << []; [] = [] * 2; [] = [] * 2; [] = [] * 2; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to next element up # 380 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 2; } << []; [] = []; [] = []; [] = []; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to next element down # 381 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = + 1; } << []; [] = []; [] = []; [] = []; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to element many removed up # 382 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; [] = []; [] = []; [] = []; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to element many removed down # 383 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 10; } << []; [] = []; [] = []; [] = []; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference swap # 385 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 5; } << []; [] = []; [] = []; [] = []; << []; }} > Type: state Hardness: 30 // random assignment, some elements, self-reference to next element up in expression # 390 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 10; } << []; [] = [] + ; [] = [] + ; [] = [] + ; << []; }} > Type: state Hardness: 40 // random assignment, some elements, self-reference to next element down in expression # 391 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = + ; } << []; [] = [] - ; [] = [] - ; [] = [] - ; << []; }} > Type: state Hardness: 40 // random assignment, some elements, self-reference to element many removed up in expression # 392 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = * 2; } << []; [] = [] + 10; [] = [] + 10; [] = [] + 10; << []; }} > Type: state Hardness: 40 // random assignment, some elements, self-reference to element many removed down in expression # 393 Array.OneDim.Assignment.Self Referential ? Array.OneDim.Assignment.Random > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; [] = [] * 10; [] = [] * 10; [] = [] * 10; << []; }} > Type: state Hardness: 40 // HOW ABOUT THIS? // # 104 // Array.Referencing.Self-Referential // > // {(){ // [] = {1,2,3}; // [[0]] = 3; // << [1]; // }} // > // Type: debug_output // Hardness: 10 // ------------------------------------------------------------------------------------ // 400 // Array.OneDim.Referencing.Random // includes expression not affecting value of a variable, // 6 possible combinations of printing elements from 3 continguous ranges // for constant and variable subscripts, // with expressions used in most cases. // random referencing, const subscript, by itself, 123 order # 400 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {1, 2, 3, 4, 5, 6, 7, 8, 9 }; << [] * 2; << [] * 2; << [] * 2; }} > Type: debug_output Hardness: 20 // random referencing, const subscript, by itself, 321 order # 401 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; << []; << []; << []; }} > Type: debug_output Hardness: 20 // random referencing, const subscript, in an expression, 213 order # 402 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {9, 8, 7, 6, 5, 4, 3, 2, 1 }; << [] * 10; << [] * 10; << [] * 10; }} > Type: debug_output Hardness: 20 // random referencing, const subscript, in an expression, 132 order # 403 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; << [] + 1; << [] + 1; << [] + 1; }} > Type: debug_output Hardness: 20 // random referencing, const subscript, in an expression, 231 order # 404 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; << [] - 10; << [] - 10; << [] - 10; }} > Type: debug_output Hardness: 20 // random referencing, const subscript, in an expression, 312 order # 405 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; << [] - 1; << [] - 1; << [] - 1; }} > Type: debug_output Hardness: 20 // random referencing, var subscript, by itself, 123 order # 410 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {1, 2, 3, 4, 5, 6, 7, 8, 9 }; = ; << [] * 10; = + ; << []; = + ; << [] * 10; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, by itself, 321 order # 411 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; = ; << [] - 1; = - ; << []; = - ; << [] + 1; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 213 order # 412 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {9, 8, 7, 6, 5, 4, 3, 2, 1 }; = ; << []; = ; << [] - ; = ; << [] + ; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 132 order # 413 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; = ; << []; = ; << [] - 40; = ; << [] - 20; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 231 order # 414 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; = ; << []; = + ; << []; = - ; << []; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 312 order # 415 Array.OneDim.Referencing.Random ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; = ; << [] - 50; = ; << [] + 50; = ; << []; }} > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------------------ // 425 // Array.OneDim.Referencing.Systematic // // first, mid, last, non-contiguous, all // up or down // without versus with expression (easy and hard for all elements only) // first third, same order # 425 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {1, 2, 3, 4, 5, 6, 7, 8, 9 }; ; for( = 0; < ; = + 1 ) { << []; } }} > Type: debug_output Hardness: 20 // last third, reverse order # 426 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; ; for( = 8; >= ; = - 1 ) { << []; } }} > Type: debug_output Hardness: 20 // all elements, correct order, easy expression # 427 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; ; for( = 0; < 6; = + 1 ) { << [] + 1; } }} > Type: debug_output Hardness: 25 // mid third, same order # 428 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = {9, 8, 7, 6, 5, 4, 3, 2, 1 }; ; for( = 3; < ; = + 1 ) { << []; } }} > Type: debug_output Hardness: 20 // non-contiguous elements, reverse order # 429 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; ; for( = 8; >= 0; = - ) { << []; } }} > Type: debug_output Hardness: 20 // all elements, reverse order, easy expression # 430 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [5] = { , , , , }; ; for( = 4; >= 0; = - 1 ) { << [] - 1; } }} > Type: debug_output Hardness: 25 // last third, same order # 431 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > {(){ [9] = { , , , , , , , , }; ; for( = ; < 9; = + 1 ) { << []; } }} > Type: debug_output Hardness: 20 // first third, reverse order # 432 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; ; for( = ; >= 0; = - 1 ) { << []; }}} > Type: debug_output Hardness: 20 // all elements, correct order, harder expression # 433 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [5] = { , , , , }; ; for( = 0; < 5; = + 1 ) { << [] + ; } }} > Type: debug_output Hardness: 25 // non-contiguous elements, same order # 434 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; ; for( = 0; < 9; = + ) { << []; } }} > Type: debug_output Hardness: 20 // middle third, reverse order # 435 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [9] = { , , , , , , , , }; ; for( = ; >= 3; = - 1 ) { << []; } > Type: debug_output Hardness: 20 // all elements, reverse order, harder expression # 436 Array.OneDim.Referencing.Systematic ? Array.OneDim.Initialization.Complete.Correct > []{(){ [6] = { , , , , , }; = 6; for( = - 1; >= 0; = - 1 ) { << [] - ; } }} > Type: debug_output Hardness: 25 // ---------------------------------------------------------------------- // Array.OneDim.Referencing.Uninitialized // 450 // random assignment, some elements, const subscript, const value # 450 Array.OneDim.Referencing.Uninitialized > {(){ []; [] = ; << []; [] = ; << []; }} > Type: debug_output Hardness: 20 // random assignment, some elements, const subscript, expression value # 451 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; [] = + 1; [] = - 1; << []; << []; }} > Type: debug_output Hardness: 25 // random assignment, some elements, const subscript, expression value # 452 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; = ; << []; [] = ; << []; [] = - ; }} > Type: debug_output Hardness: 30 // random assignment, some elements, const subscript, expression value # 453 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; [] = ; << []; [] = * 100; << []; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, var subscript, const value # 455 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; [] = ; = ; [] = ; << []; = ; << []; [] = ; }} > Type: debug_output Hardness: 25 // random assignment, some elements, var subscript, variable value # 456 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; << []; = ; [] = ; = ; [] = ; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, var subscript, variable value # 457 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; = ; = ; [] = ; << []; [] = ; << []; [] = ; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, var subscript, expression value # 458 Array.OneDim.Referencing.Uninitialized > {(){ []; = ; << []; [] = * ; << []; = ; [] = * 2; << []; = ; [] = + 2; << []; }} > Type: debug_output Hardness: 35 // ---------------------------------------------------------------------- // Array.OneDim.Subscript.Expression // Use array initialization // Use random referencing - 3 elements (may be reuse random ref templates?) // 3+, -I+, 3-, 3*, *I/, 3/ // const vs variable value // without versus in expressions // 3+, expression value # 500 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = ; [ + 1] = + 10; [ + ] = ; [ + ] = + 100; }} > Type: state Hardness: 40 // -I+, expression value # 501 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = ; [ - ] = + ; [] = ; [ + ] = - ; }} > Type: state Hardness: 40 // 3-, const value # 502 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = ; [ - ] = * 10; [ - ] = + 10; [ - ] = ; }} > Type: state Hardness: 35 // 3*, const value # 503 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 1; [ * 2] = ; [ * 4] = ; = * 8; [] = ; }} > Type: state Hardness: 40 // *I/, expression value # 504 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 4; [ * 2] = / 2; [] = ; [ / 2] = * 2; }} > Type: state Hardness: 40 // 3/, expression value # 505 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 8; = 2; [ / ] = * ; = * 2; [ / ] = + ; = * 2; [ / ] = - ; }} > Type: state Hardness: 35 // 3+, expression value # 506 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 0; = ; [ + ] = + ; [ + * 2] = - ; [ + * 3] = ; }} > Type: state Hardness: 40 // +I-, expression value # 507 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = ; = ; [ + ] = - ; [ - ] = + ; [ - - 1] = ; }} > Type: state Hardness: 40 // 3-, expression value # 508 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = ; [ - ] = * 10; [ - ] = * 10; [ - ] = * 10; }} > Type: state Hardness: 35 // 3*, const value # 509 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 1; [ * 3 - 1] = + ; [ * 6] = * ; [ * 9 - 1] = - ; }} > Type: state Hardness: 40 // /I*, expression value # 510 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 10; = 2; [ / ] = / ; [ * ] = * ; = + 1; [ * ] = ; }} > Type: state Hardness: 40 // 3/, expression value # 511 Array.OneDim.Subscript.Expression ? Array.OneDim.Assignment.Random > {(){ []; = 18; [ / 2] = / 9; [ / 3] = / 6; [ / 6] = / 3; }} > Type: state Hardness: 35 // ---------------------------------------------------------------------- // 525 // Only complete array initialization used // Only random assignment/referencing used - 3 random assignments/referencings per problem // Only one of the three is out of bounds - // either on the border or beyond the border // systematic referencing with size as argument? // assignment // const vs variable subscript // in an expression vs by itself // NOTE: Not giving credit for random assignment because student does not need to understand it // to correctly identify out of bounds access // referencing // const vs variable subscript // in an expression vs by itself // NOTE: Not giving credit for random assignment because student does not need to understand it // to correctly identify out of bounds access // random assignment, some elements, var subscript, variable value, first # 525 Array.OneDim.Subscript.Out of Bounds > {(){ []; = 20; = / 2; [] = * 2; = / 2; [] = * 4; << []; = / 5; [] = * 5; << []; }} > Type: debug_output Hardness: 30 // random referencing, const subscript, by itself, *21 order # 526 Array.OneDim.Subscript.Out of Bounds > []{(){ [6] = { , , , , , }; << []; << []; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, const subscript, const value, last # 527 Array.OneDim.Subscript.Out of Bounds > Array.OneDim.Assignment.Random > {(){ []; [] = ; [] = ; [] = ; << []; << []; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, by itself, 2*1 order # 528 Array.OneDim.Subscript.Out of Bounds > {(){ [7] = {7, 6, 5, 4, 3, 2, 1 }; = ; << []; = * 2; << []; = / 4; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, const subscript, expression value, mid # 529 Array.OneDim.Subscript.Out of Bounds ? Array.OneDim.Assignment.Random > {(){ []; = ; = ; [] = - ; [] = + ; [] = % ; << []; << []; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 12* order # 530 Array.OneDim.Subscript.Out of Bounds > {(){ [9] = { , , , , , , , }; = ; << [] + 1; = + ; << [] - 1; = + ; << []; }} > Type: debug_output Hardness: 30 // random assignment, some elements, var subscript, expression value, mid # 531 Array.OneDim.Subscript.Out of Bounds ? Array.OneDim.Assignment.Random > {(){ []; = ; [] = + 1; << []; [] = * 10; [] = - 1; << []; }} > Type: debug_output Hardness: 30 // random referencing, const subscript, in an expression, 12* order # 532 Array.OneDim.Subscript.Out of Bounds > {(){ [8] = {1, 2, 3, 4, 5, 6, 7, 8 }; << [] / 2; << [] % 2; << []; }} > Type: debug_output Hardness: 30 // random assignment, const subscript, expression value # 533 Array.OneDim.Subscript.Out of Bounds ? Array.OneDim.Assignment.Random > {(){ []; = ; [] = ; [] = * 10; [] = * 100; << []; << []; }} > Type: debug_output Hardness: 30 // random referencing, const subscript, in an expression, *21 order # 534 Array.OneDim.Subscript.Out of Bounds > []{(){ [9] = { , , , , , , , , }; << [9]; << [] - 10; << [] - 10; }} > Type: debug_output Hardness: 30 // random assignment, some elements, var subscript, expression value # 535 Array.OneDim.Subscript.Out of Bounds ? Array.OneDim.Assignment.Random > {(){ []; = ; [] = * 10; = - ; [] = + 10; << []; = + ; [] = * 10; << []; }} > Type: debug_output Hardness: 30 // random referencing, var subscript, in an expression, 1*2 order # 536 Array.OneDim.Subscript.Out of Bounds > {(){ [9] = { , , , , , , , , }; = ; << [] / ; = * 2; << [] * ; = % 10; << [] % 10; }} > Type: debug_output Hardness: 30 // NOT DESIGNATING NEED FOR UNDERSTANDING SYSTEMATIC ASSIGNMENT SINCE // UNDERSTANDING LOOPS SUFFICES. // exprsn referencing subscript, systematic assignment to all elements # 540 Array.OneDim.Subscript.Out of Bounds > {(){ []; ; for( = 0; < ; = + 1 ) { [] = ; } << []; }} > Type: debug_output Hardness: 40 # 541 Array.OneDim.Subscript.Out of Bounds > {(){ []; = 0; while( < ) { [] = ; = + 1; } << []; }} > Type: debug_output Hardness: 40 # 542 Array.OneDim.Subscript.Out of Bounds > {(){ []; = 0; do{ [] = + 1; = + 1; } while( < ); << []; }} > Type: debug_output Hardness: 40 // // To test null subscript and error subscript - both work // # 549 // Array.OneDim.Subscript.Out of Bounds // > // {(){ // [6] = // { // , // , // , // , // , // // }; // // << []; // ; // << []; // }} // > // Type: debug_output // Hardness: 40 // -------------------------------------------------------------------------- // 600 // Array.OneDim.Parameter.Aggregate.Accessed // Added by REW // // Function declares an array parameter // Function outputs two randomly chosen array elements # 600 Array.OneDim.Parameter.Aggregate.Accessed > {([]){ = ; << []; = ; << [];} (){ [6] = { , , , , , }; << []; (); }} > Type: debug_output Hardness: 30 // Function declares an array parameter and an index parameter // Function outputs specified random index and corresponding array element # 601 Array.OneDim.Parameter.Aggregate.Accessed > []{([], ){ << ; << [];} (){ [5] = { , , , , }; << []; (,); }} > Type: debug_output Hardness: 30 // Function declares an index parameter and array parameter // Function outputs the sum of index and array element # 602 Array.OneDim.Parameter.Aggregate.Accessed > {(,[]){ << +[];} (){ [5] = { , , , , }; << []; (,); }} > Type: debug_output Hardness: 30 // Function declares an array parameter and two index parameters // Function outputs two specified random array elements # 603 Array.OneDim.Parameter.Aggregate.Accessed > {([],,){ << []; << [];} (){ [6] = { , , , , , }; << []; (,,); }} > Type: debug_output Hardness: 30 // Function declares two index parameters and an array parameter // Function outputs sum and difference two specified random array elements # 604 Array.OneDim.Parameter.Aggregate.Accessed > {(,,[]){ << [] + []; << [] - [];} (){ [6] = { , , , , , }; << []; (,,); }} > Type: debug_output Hardness: 30 // Function declares an array parameter and two index parameters // Function outputs larger of two specified random array elements # 605 Array.OneDim.Parameter.Aggregate.Accessed > {([],,){ if([] > []){ << []; } else{ << []; }} (){ [6] = { , , , , , }; << []; (,,); }} > Type: debug_output Hardness: 30 // // 610 -612 - The function definition involves a for-loop // // NO // //Function declares an array parameter // // Function outputs the sum of the first three array elements // # 610 // Array.OneDim.Parameter.Aggregate.Accessed // > // {([]){ // =0; // ; // for( = 0; < 3; = + 1 ) // { // =+[]; // } // << ; // } // (){ // [5] = // { // , // , // , // , // // }; // << []; // (); // }} // > // Type: debug_output // Hardness: 30 // // // NO // // Function declares an array parameter and an integer parameter // // Function outputs sum of specified random number of array elements // # 611 // Array.OneDim.Parameter.Aggregate.Accessed // > // {([],){ // =0; // ; // for( = 0; < ; = + 1 ) // { // =+[]; // } // << ; // } // (){ // [6] = // { // , // , // , // , // , // // }; // << []; // (,); // }} // > // Type: debug_output // Hardness: 30 // // // NO // // Function declares an integer parameter and an array parameter // // Function outputs specified random number of array elements in reverse order // # 612 // Array.OneDim.Parameter.Aggregate.Accessed // > // {(,[]){ // ; // for( = - 1; >= 0; = - 1 ) // { // << []; // } // } // (){ // [5] = // { // , // , // , // , // // }; // << []; // (,); // }} // > // Type: debug_output // Hardness: 30 // -------------------------------------------------------------------------- // 625-649 Array.OneDim.Parameter.Aggregate.Modified // Added by REW // Function declares an array parameter // Function assigns new random values to two randomly chosen array elements # 625 Array.OneDim.Parameter.Aggregate.Modified > {([]){ = ; [] = ; = ; [] = ;} (){ [6] = { , , , , , }; << []; (); << []; }} > Type: state Hardness: 30 // Function declares an array parameter and two integer parameters // Function assigns specified random value to specified random array element # 626 Array.OneDim.Parameter.Aggregate.Modified > {([],,){ [] = ;} (){ [4] = { , , , }; << []; (,,); << []; }} > Type: state Hardness: 30 // Function declares an array parameter and two integer parameters for indices // Function exchanges the values of the two specified random array element # 627 Array.OneDim.Parameter.Aggregate.Modified > {([],,){ =[]; [] = []; [] = ;} (){ [6] = { , , , , , }; << []; (,,); << []; }} > Type: state Hardness: 30 // Function declares an array parameter and two integer parameters // Function adds specified random value to specified random array element # 628 Array.OneDim.Parameter.Aggregate.Modified > {([],,){ [] = [] + ;} (){ [4] = { , , , }; << []; (,,); << []; }} > Type: state Hardness: 30 // Function declares an array parameter and two integer parameters for indices // Function doubles the values of the two specified randomly chosen array elements # 629 Array.OneDim.Parameter.Aggregate.Modified > {(,,[]){ [] = [] * 2; [] = [] * 2;} (){ [6] = { , , , , , }; << []; (,,); << []; }} > Type: state Hardness: 30 // Function declares an array parameter and two integer parameters for indices // Function adds two to one specified array element and subtracts two from another # 630 Array.OneDim.Parameter.Aggregate.Modified > {([],,){ [] = [] + 2; [] = [] - 2;} (){ [4] = { , , , , , }; << []; (,,); << []; }} > Type: state Hardness: 30 // 635 -637 - The function definition involves a for-loop //Function declares an array parameter and an integer parameter // Function adds specified random value to each array element # 635 Array.OneDim.Parameter.Aggregate.Modified > {([],){ ; for( = 0; < 5; = + 1 ) { []=[]+; } } (){ [5] = { , , , , }; << []; (,); << []; }} > Type: state Hardness: 30 //Function declares an array parameter and an integer parameter // Function sets each array element greater than specified value equal to it # 636 Array.OneDim.Parameter.Aggregate.Modified > {([],){ ; for( = 0; < 5; = + 1 ){ if ([] > ){ []=; }}} (){ [5] = { , , , , }; << []; (,); << []; }} > Type: state Hardness: 30 //Function declares an array parameter and an integer parameter for size of array // Function doubles each array element # 637 Array.OneDim.Parameter.Aggregate.Modified > {(,[]){ ; for( = 0; < ; = + 1 ){ []=[]*2; }} (){ [5] = { , , , , }; << []; (5,); << []; }} > Type: state Hardness: 30 // Old test templates # 640 Array.OneDim.Parameter.Aggregate.Modified > {([]){ = ; << [4]; << []; = ; << []; } ([]){ = ; [4] = ; [] = ; = ; [] = ; } (){ [6] = { , , , , , }; << []; = 2; << []; (); << []; (); << []; }} > Type: debug_output Hardness: 30 # 641 Array.OneDim.Parameter.Aggregate.Modified > {([]){ = ; [] = ; = ; [] = ;} (){ [6] = { , , , , , }; << []; (); << []; }} > Type: state Hardness: 30 //-------------------------------------------------------------------------- // 650-674 Array.OneDim.Parameter.Element // Added by REW // Function declares an integer parameter and outputs that parameter // In main(), function is passed a randomly chosen array element # 650 Array.OneDim.Parameter.Element > {(){<<;} (){ [6] = { , , , , , }; << []; ([]); }} > Type: debug_output Hardness: 30 // Function declares two integer parameters and outputs those parameters // In main(), function is passed two randomly chosen array elements # 651 Array.OneDim.Parameter.Element > {(,){<<;<<;} (){ [6] = { , , , , , }; << []; ([],[]); }} > Type: debug_output Hardness: 30 // Function declares an integer parameter and outputs it if it is less than 7 else outputs 5 less // In main(), function is called twice with different randomly chosen array elements # 652 Array.OneDim.Parameter.Element > {(){ if( < 7){ << ; } else { << - 5; }} (){ [6] = { , , , , , }; << []; ([]); ([]); }} > Type: debug_output Hardness: 30 // Function declares two integer parameters and outputs twice first parameter minus second // In main(), function is called with two array elements and then called with arguments reversed # 653 Array.OneDim.Parameter.Element > {(,){<< * 2 - ;} (){ [6] = { , , , , , }; << []; ([],[]); ([],[]); }} > Type: debug_output Hardness: 30 // Function declares an integer parameter and outputs that parameter // In main(), function is passed an array element twice # 654 Array.OneDim.Parameter.Element > {(){ if ( % 2 == 0){ <</2; } else { <<; }} (){ [6] = { , , , , , }; << []; ([]); ([]); }} > Type: debug_output Hardness: 30 // Function declares two integer parameters and outputs the larger // In main(), function is passed two randomly chosen array elements # 655 Array.OneDim.Parameter.Element > {(,){ if ( > ){ <<; } else { <<; }} (){ [6] = { , , , , , }; << []; ([],[]); }} > Type: debug_output Hardness: 30 // 660 -662 - The main() function definition involves a for-loop // Function declares an integer parameter and outputs one more than it // The main() function has a for-loop which calls the function with array element as argument # 660 Array.OneDim.Parameter.Element > {(){ << + 1; } (){ [5] = { , , , , }; << []; ; for( = 0; < 5; = + 1 ){ ([]); } }} > Type: debug_output Hardness: 30 // Function declares an integer parameter and outputs the parameter squared // The main() function has a for-loop which calls the function with array element as argument # 661 Array.OneDim.Parameter.Element > {(){ << * ; } (){ [4] = { , , , }; << []; ; for( = 0; < 4; = + 1 ){ ([]); } }} > Type: debug_output Hardness: 30 // Function outputs parameter plus 1 if it is even else outputs parameter minus one // The main() function has a for-loop which calls the function with array element as argument # 662 Array.OneDim.Parameter.Element > {(){ if ( % 2 == 0){ << + 1; } else { << - 1; }} (){ [4] = { , , , }; << []; ; for( = 0; < 4; = + 1 ){ ([]); } }} > Type: debug_output Hardness: 30 // Old test templates # 670 Array.OneDim.Parameter.Element > {(){<<;} (){ [6] = { , , , , , }; << []; ([]); }} > Type: debug_output Hardness: 30 # 671 Array.OneDim.Parameter.Element > {(,){<<;<<;} (){ [6] = { , , , , , }; << []; ([],[]); }} > Type: debug_output Hardness: 30 // -------------------------------------------------------------------------- // 675 // Array.OneDim.Parameter.Data type of the actual parameter in the call is incompatible with the data type of the formal parameter in the definition // When formal parameter is an array // Actual parameter is // a constant // a variable // an array element // When formal parameter is a variable // Actual parameter is an entire array # 675 Array.OneDim.Parameter.Data type of the actual parameter in the call is incompatible with the data type of the formal parameter in the definition > {([]){ = ; << []; = ; << [];} (){ [6] = { , , , , , }; =; (); }} > Type: debug_output Hardness: 20 # 676 Array.OneDim.Parameter.Data type of the actual parameter in the call is incompatible with the data type of the formal parameter in the definition > {([]){ = ; << []; = ; << [];} (){ [6] = { , , , , , }; =; (); }} > Type: debug_output Hardness: 20 # 677 Array.OneDim.Parameter.Data type of the actual parameter in the call is incompatible with the data type of the formal parameter in the definition > {([]){ = ; << []; = ; << [];} (){ [6] = { , , , , , }; =; ([]); }} > Type: debug_output Hardness: 30 # 678 Array.OneDim.Parameter.Data type of the actual parameter in the call is incompatible with the data type of the formal parameter in the definition > {([]){ = ; << []; = ; << [];} (){ [6] = { , , , , , }; =; ([]); }} > Type: debug_output Hardness: 30 // -------------------------------------------------------------------------- // 700 // Array.OneDim.Incomplete use //Only the first n items of an array are being used, so an additional variable must be maintained // -------------------------------------------------------------------------- // 725 // Array.OneDim.Lockstep // Assigning to one array from the other // Print corresponding elements of the two arrays // -------------------------------------------------------------------------- // 750 // Array.OneDim.BinSort // WILL NOT WORK WELL WITHOUT INPUT // Count number of each number // Bin numbers into // -------------------------------------------------------------------------- // // Multiple elements assigned with expression // # 107 // Array.TwoDim.Assignment.Systematic // > // {(){[][3]; // [2][1] = 5; // [1][2] = 7; // for( = 0; < ; = + 1) // { // for( = 0; < 3; = + 1) // { // << [][]; // } // } // }} // > // Type: debug_output // Hardness: 5 // // # 100 // Array.MultiDim.Initialization // > // {(){ // [][][] = { { {0,5}, {10,50} }}; // [0][0][0] = 1; // ; // << [][][]; // << [0][[0][0][0]][0]; // << [0][1][1]; // }} // > // Type: debug_output // Hardness: 10 // // // # 100 // Array.MultiDim.Initialization // > // {(){ // [][][] = { { {3,5}, {10,50} }, { {8,9}, {10,11} }}; // [0][0][0] = 5; // << [0][0][0]; // << [][1]; // }} // > // Type: debug_output // Hardness: 10 // // // # 101 // Array.MultiDim.Initialization // > // {(){ // [2][3] = { {3, 9, 5}, {5, 4, 4} }; // [1][0] = 5; // [1][2] = 10; // << [1][2]; // }} // > // Type: debug_output // Hardness: 10 // // // # 900 // Array.MultiDim.Declaration.Correct // > // {(){ = 1;[][2][3] = { { { , 1, 3 }, { 4, 5, 6 } }, { { 7, 8, 9 }, { , , -88 } } }; // [0][[0][0][1]][[0][0][1]] = ;[0][1][1] = ;<<[0][1][];<< [0][1][2] + [1][1][0];}} // > // Type: debug_output // Hardness: 10 // // # 1000 // Array.TwoDim.Declaration.Correct // > // {(){ = 1;[][2] = { {, }, {, }, {, } }; // [0][0] = ;[1][1] = 6;<<[][];<< [0][1] + [1][0];}} // > // Type: debug_output // Hardness: 10 // -------------------------------------------------------------------------- // Templates here are for demonstration purposes // Included at the end so that regular practice does not pick up these templates // NEED TEMPLATES FOR STATE // How to enter an output # 90 Demonstration > {(){=;<<;}} > Type: debug_output Hardness: 10 // How to enter multiple outputs # 91 Demonstration > {(){=;<<;=;<<;<< - ;}} > Type: debug_output Hardness: 10 // How to enter NO output # 92 Demonstration > {(){=;=;; = + ;}} > Type: debug_output Hardness: 10