// ------------------------------------------------------------------------- // Arithmetic Operators - 1 operator - ALL DONE // ---------- // Correctness // Addition, Multiplication // integers // real // mixed-mode: integers & reals // Subtraction // integers // small - large, large - small, equal // real // small - large, large - small, equal // mixed-mode: integers & reals // Division // integers // large / small, small / large, // real numbers // large / small, small / large, // mixed-mode: integers & reals // Modulus // integers // large op small, small op large, equal op equal // real - error # 101 Arithmetic.+.Correct > 4 + 5 > Type: expression Hardness: 10 # 102 Arithmetic.*.Correct > 3 * 4 > Type: expression Hardness: 10 # 103 Arithmetic.+.Correct > 2.5 + 1.5 > Type: expression Hardness: 10 # 104 Arithmetic.*.Correct > 2.5 * 2.0 > Type: expression Hardness: 10 # 105 Arithmetic.+.Correct ? Arithmetic.+.Coercion > 3 + 5.5 > Type: expression Hardness: 20 # 106 Arithmetic.*.Correct ? Arithmetic.*.Coercion > 3.5 * 2 > Type: expression Hardness: 20 # 107 Arithmetic.-.Correct > 4 - 7 > Type: expression Hardness: 10 # 108 Arithmetic.-.Correct > 8 - 5 > Type: expression Hardness: 10 # 109 Arithmetic.-.Correct > 6 - 6 > Type: expression Hardness: 10 # 110 Arithmetic.-.Correct > 5.5 - 3.0 > Type: expression Hardness: 10 # 111 Arithmetic.-.Correct > 2.0 - 4.5 > Type: expression Hardness: 10 # 112 Arithmetic.-.Correct > 4.0 - 4.0 > Type: expression Hardness: 10 # 113 Arithmetic.-.Correct ? Arithmetic.-.Coercion > 7 - 3.5 > Type: expression Hardness: 20 # 114 Arithmetic.-.Correct ? Arithmetic.-.Coercion > 4 - 6.5 > Type: expression Hardness: 20 # 115 Arithmetic.-.Correct ? Arithmetic.-.Coercion > 8 - 8.0 > Type: expression Hardness: 20 # 116 Arithmetic./.Integer.Correct > 7 / 4 > Type: expression Hardness: 20 # 117 Arithmetic./.Integer.Correct > 3 / 6 > Type: expression Hardness: 20 # 118 Arithmetic./.Real.Correct > 6.0 / 4.0 > Type: expression Hardness: 20 # 119 Arithmetic./.Real.Correct > 4.0 / 8.0 > Type: expression Hardness: 20 # 120 Arithmetic./.Real.Correct ? Arithmetic./.Coercion > 6.0 / 4 > Type: expression Hardness: 20 # 121 Arithmetic./.Real.Correct ? Arithmetic./.Coercion > 2.0 / 4 > Type: expression Hardness: 20 # 122 Arithmetic.%.Correct > 7 % 4 > Type: expression Hardness: 20 # 123 Arithmetic.%.Correct > 4 % 7 > Type: expression Hardness: 20 # 124 Arithmetic.%.Correct > 6 % 6 > Type: expression Hardness: 20 # 125 Arithmetic.%.Incorrect operand type for modulus (%) operator > 5.0 % 2 > Type: expression Hardness: 30 # 126 Arithmetic.-.Correct > 8 - -5 > Type: expression Hardness: 15 # 127 Arithmetic.-.Correct > -5 - 7 > Type: expression Hardness: 15 # 128 Arithmetic.-.Correct > -5 - -9 > Type: expression Hardness: 15 # 131 Arithmetic./.Dividing By Zero > 8 / 0 > Type: expression Hardness: 15 # 132 Arithmetic.%.Dividing By Zero > 5 % 0 > Type: expression Hardness: 15 // ------------------------------------------------------------------------- // Precedence - Two Operators only - ALL DONE // + *, + / (both int and real), + % // - *, - / (both int and real), - % // Error for modulus # 201 Arithmetic.{+.Precedence,*.Precedence} > 3 + 4 * 5 > Type: expression Hardness: 30 # 202 Arithmetic.{+.Precedence,*.Precedence} > 4.0 + 6 * 3 > Type: expression Hardness: 40 # 203 Arithmetic.{+.Precedence,/.Precedence} > 6 + 7 / 3 > Type: expression Hardness: 30 # 204 Arithmetic.{+.Precedence,/.Precedence} > 5 + 7.0 / 4.0 > Type: expression Hardness: 40 # 205 Arithmetic.{+.Precedence,/.Precedence} > 4 + 4.0 / 8 > Type: expression Hardness: 40 # 206 Arithmetic.{+.Precedence,/.Precedence} > 3.5 + 7 / 4 > Type: expression Hardness: 40 # 207 Arithmetic.{+.Precedence,%.Precedence} > 3 + 7 % 4 > Type: expression Hardness: 30 # 208 Arithmetic.{+.Precedence,%.Precedence} > 4.0 + 3 % 8 > Type: expression Hardness: 40 # 209 Arithmetic.{-.Precedence,*.Precedence} > 8 - 2 * 5 > Type: expression Hardness: 30 # 210 Arithmetic.{-.Precedence,*.Precedence} > 7 - 1.5 * 2 > Type: expression Hardness: 40 # 211 Arithmetic.{-.Precedence,/.Precedence} > 7 - 4 / 3 > Type: expression Hardness: 30 # 212 Arithmetic.{-.Precedence,/.Precedence} > 9 - 6 / 4.0 > Type: expression Hardness: 40 # 213 Arithmetic.{-.Precedence,/.Precedence} > 7 - 2.0 / 8.0 > Type: expression Hardness: 40 # 214 Arithmetic.{-.Precedence,/.Precedence} > 8.5 - 4 / 6 > Type: expression Hardness: 40 # 215 Arithmetic.{-.Precedence,%.Precedence} > 9 - 4 % 6 > Type: expression Hardness: 30 # 216 Arithmetic.{-.Precedence,%.Precedence} > 8.5 - 8 % 3 > Type: expression Hardness: 40 # 217 Arithmetic.%.Incorrect operand type for modulus (%) operator ? Arithmetic.{%.Precedence,+.Precedence} > 5 + 6.0 % 6 > Type: expression Hardness: 30 # 218 Arithmetic.%.Incorrect operand type for modulus (%) operator ? Arithmetic.{%.Precedence,+.Precedence} > 8 + 4 % 8.0 > Type: expression Hardness: 30 # 219 Arithmetic.%.Incorrect operand type for modulus (%) operator ? Arithmetic.{%.Precedence,-.Precedence} > 9 - 4 % 4.0 > Type: expression Hardness: 30 # 220 Arithmetic.%.Incorrect operand type for modulus (%) operator ? Arithmetic.{%.Precedence,-.Precedence} > 7 - 9.0 % 2 > Type: expression Hardness: 30 // ------------------------------------------------------------------------- // Associativity - 2 operators- ALL DONE // + + + // - - - // * * * // / / / // % % % # 301 Arithmetic.+.Associativity > 3 + 4 + 5 > Type: expression Hardness: 50 # 302 Arithmetic.+.Associativity > 2 + 5 + 3.0 > Type: expression Hardness: 50 # 303 Arithmetic.-.Associativity > 9 - 5 - 2.0 > Type: expression Hardness: 50 # 304 Arithmetic.-.Associativity > 11 - 3.0 - 6 > Type: expression Hardness: 50 # 305 Arithmetic.*.Associativity > 2 * 3 * 1.5 > Type: expression Hardness: 50 # 306 Arithmetic.*.Associativity > 4 * 1.5 * 2 > Type: expression Hardness: 50 # 307 Arithmetic./.Associativity > 12 / 2 / 2 > Type: expression Hardness: 50 # 308 Arithmetic./.Associativity > 16 / 8 / 4 > Type: expression Hardness: 50 # 309 Arithmetic./.Associativity > 10 / 2.5 / 2 > Type: expression Hardness: 50 # 310 Arithmetic./.Associativity ? Arithmetic./.Integer.Correct > 9 / 3 / 2.0 > Type: expression Hardness: 50 # 311 Arithmetic.%.Associativity > 9 % 5 % 2 > Type: expression Hardness: 50 # 312 Arithmetic.%.Associativity > 10 % 6 % 3 > Type: expression Hardness: 50 # 313 Arithmetic.%.Incorrect operand type for modulus (%) operator ? Arithmetic.%.Associativity > 10 % 4 % 3.0 > Type: expression Hardness: 50 # 314 Arithmetic.%.Incorrect operand type for modulus (%) operator > 15 % 6.0 % 2 > Type: expression Hardness: 50 # 315 Arithmetic.%.Incorrect operand type for modulus (%) operator > 15.0 % 2.5 % 4 > Type: expression Hardness: 50 # 321 Arithmetic./.Dividing By Zero > 4 * 2 / 0 > Type: expression Hardness: 20 # 322 Arithmetic./.Dividing By Zero > 9 / 3 / 0 > Type: expression Hardness: 20 # 323 Arithmetic./.Dividing By Zero > 8 % 5 / 0 > Type: expression Hardness: 20 # 331 Arithmetic.%.Dividing By Zero > 5 * 3 % 0 > Type: expression Hardness: 20 # 332 Arithmetic.%.Dividing By Zero > 6 / 4 % 0 > Type: expression Hardness: 20 # 333 Arithmetic.%.Dividing By Zero > 9 % 6 % 0 > Type: expression Hardness: 20 // ------------------------------------------------------------------------- // Precedence & Associativity - 3 Operators - ALL DONE // + + * (int), + * + (real) // * + * // + + / (int), + / + (real) // / + / // + + % (int), + % + // % + % // - - * (int), - * - (real) // * - * // - - / (int), - / - (real) // / - / // - - % (int), - % - // % - % // % with errors // / + %, / - % // / + *, / - * // * + %, * - % // Divide by Zero errors # 401 Arithmetic.{*.Precedence,+.{Precedence,Associativity}} ? Arithmetic.+.Associativity > -8 + 5 + 2 * 3 > Type: expression Hardness: 40 # 402 Arithmetic.{*.Precedence,+.{Precedence,Associativity}} ? Arithmetic.+.Associativity > 0.5 + 4 * 2.5 + 2 > Type: expression Hardness: 50 # 403 Arithmetic.{+.Precedence,*.{Precedence,Associativity}} > 2 * 4 + 2 * 1.5 > Type: expression Hardness: 50 # 404 Arithmetic.{/.Precedence,+.{Precedence,Associativity}} > -6 + 4 + 8 / 5 > Type: expression Hardness: 40 # 405 Arithmetic.{/.Precedence,+.{Precedence,Associativity}} > 3 + 4.5 + 8 / 3 > Type: expression Hardness: 50 # 406 Arithmetic.{/.Precedence,+.{Precedence,Associativity}} > 3 + 6 / 4.0 + 0.8 > Type: expression Hardness: 50 # 407 Arithmetic.{+.Precedence,/.{Precedence,Associativity}} > 10 / 4 + 10.0 / 4.0 > Type: expression Hardness: 50 # 408 Arithmetic.{%.Precedence,+.{Precedence,Associativity}} > -8 + 3 + 7 % 4 > Type: expression Hardness: 40 # 409 Arithmetic.{%.Precedence,+.{Precedence,Associativity}} > 3 + 15 % 7 + 5 > Type: expression Hardness: 40 # 410 Arithmetic.{+.Precedence,%.{Precedence,Associativity}} > 10 % 3 + 3 % 10 > Type: expression Hardness: 50 # 411 Arithmetic.%.Incorrect operand type for modulus (%) operator > 6 + 2 + 8.0 % 4.0 > Type: expression Hardness: 60 # 412 Arithmetic.%.Incorrect operand type for modulus (%) operator > 4 + 10 % 10.0 + 4 > Type: expression Hardness: 60 # 413 Arithmetic.%.Incorrect operand type for modulus (%) operator > 12 % 5 + 5 % 12.0 > Type: expression Hardness: 60 # 414 Arithmetic.{*.Precedence,-.{Precedence,Associativity}} > 2 - 4 - 2 * 4 > Type: expression Hardness: 40 # 415 Arithmetic.{*.Precedence,-.{Precedence,Associativity}} > 4.5 - 4 * 2 - 2.5 > Type: expression Hardness: 50 # 416 Arithmetic.{-.Precedence,*.{Precedence,Associativity}} > 2.5 * 4 - 4.5 * 2 > Type: expression Hardness: 50 # 417 Arithmetic.{/.Precedence,-.{Precedence,Associativity}} > 9 - 5 - 9 / 5 > Type: expression Hardness: 40 # 418 Arithmetic.{/.Precedence,-.{Precedence,Associativity}} > 4 - 3 / 1.5 - 3.5 > Type: expression Hardness: 50 # 419 Arithmetic.{-.Precedence,/.{Precedence,Associativity}} > 4 / 9 - 9 / 4 > Type: expression Hardness: 50 # 420 Arithmetic.{-.Precedence,/.{Precedence,Associativity}} > 8 / 5 - 8 / 5.0 > Type: expression Hardness: 50 # 421 Arithmetic.{-.Precedence,/.{Precedence,Associativity}} > 15.0 / 6.0 - 15 / 6 > Type: expression Hardness: 50 # 422 Arithmetic.{-.{Precedence,Associativity},%.Precedence} > 2 - 6 - 2 % 6 > Type: expression Hardness: 40 # 423 Arithmetic.{-.{Precedence,Associativity},%.Precedence} > 7 - 7 % 4 - 4 > Type: expression Hardness: 40 # 424 Arithmetic.{-.Precedence,%.{Precedence,Associativity}} > 9 % 5 - 5 % 9 > Type: expression Hardness: 50 # 425 Arithmetic.%.Incorrect operand type for modulus (%) operator > 10 - 4 - 10 % 4.0 > Type: expression Hardness: 60 # 426 Arithmetic.%.Incorrect operand type for modulus (%) operator > 8 - 5 % 2.5 - 3 > Type: expression Hardness: 60 # 427 Arithmetic.%.Incorrect operand type for modulus (%) operator > 8 % 5 - 5 % 8.0 > Type: expression Hardness: 60 # 428 Arithmetic.{/.{Precedence,Associativity},%.{Precedence,Associativity},+.Precedence} > 3 / 6 + 3 % 6 > Type: expression Hardness: 50 # 429 Arithmetic.{/.{Precedence,Associativity},%.{Precedence,Associativity},-.Precedence} > 8 / 5 - 8 % 5 > Type: expression Hardness: 50 # 430 Arithmetic.{/.{Precedence,Associativity},%.{Precedence,Associativity},-.Precedence} > 6 % 6 - 6 / 6 > Type: expression Hardness: 50 # 431 Arithmetic.{/.{Precedence,Associativity},%.{Precedence,Associativity},-.Precedence} > 10 / 4.0 - 10 % 4 > Type: expression Hardness: 50 # 432 Arithmetic.%.Incorrect operand type for modulus (%) operator > 9 / 5.0 - 9 % 5.0 > Type: expression Hardness: 60 # 433 Arithmetic.{/.{Precedence,Associativity},*.{Precedence,Associativity},+.Precedence} > 5 / 3 + 3 * 5 > Type: expression Hardness: 40 # 434 Arithmetic.{/.{Precedence,Associativity},*.{Precedence,Associativity},-.Precedence} > 10 / 2.5 - 4 * 2.5 > Type: expression Hardness: 50 # 435 Arithmetic.{/.{Precedence,Associativity},*.{Precedence,Associativity},+.Precedence} > 5 / 5 + 5 * 5 > Type: expression Hardness: 40 # 436 Arithmetic.{*.{Precedence,Associativity},%.{Precedence,Associativity},+.Precedence} > 3 * 3 + 3 % 3 > Type: expression Hardness: 40 # 437 Arithmetic.{*.{Precedence,Associativity},%.{Precedence,Associativity},-.Precedence} > 7 % 7 - 7 * 7 > Type: expression Hardness: 50 # 438 Arithmetic.{*.{Precedence,Associativity},%.{Precedence,Associativity},-.Precedence} > 5 * 0 - 15 % 5 > Type: expression Hardness: 50 # 439 Arithmetic.%.Incorrect operand type for modulus (%) operator > 2 * 3 + 4 % 0.5 > Type: expression Hardness: 60 # 440 Arithmetic.{/.{Precedence,Associativity},-.Precedence} > 7 / 3 - 5 / 0 > Type: expression Hardness: 50 # 441 Arithmetic.%.Dividing By Zero > 8 - 6 - 4 % 0 > Type: expression Hardness: 60 # 442 Arithmetic.%.Incorrect operand type for modulus (%) operator > 2 * 3 / 4.0 % 2 > Type: expression Hardness: 60 # 998 Arithmetic > {=; * 5 + % 5;} > Type: expression Hardness: 60 # 999 Arithmetic > 3 * 4 - -5 / 2 <= 10 % 3 > Type: expression Hardness: 60