Test Your Knowledge!

  1. In each of the following examples, write down the value of the expression.
  1. Sqr( ( 8 * 3 ) % 5 );
  2. Sqr( Sqrt ( 45.31 ) );
  3. Max( 6 * Sqrt( 25 ), Mod( 60, 31 ) );
  4. Min( 7 – Sqr( 3 ), Sign( -50 ) );
  5. Abs( 7 – 22 );
  6. Sign( 43 ) * Abs( 43 );
  7. Ceil( ( 16 / 5 ) * 4 );
  8. Ceil( 7 / 2) + Floor ( 7 / 2 );
  1. Write down the maximum and minimum potential values for each of the following expressions.
  1. Rnd() * 5;
  2. Ceil( Rnd() * 6 );
  3. Floor( Rnd() * 12 );
  4. Rnd() * Sign( 32 – 64 );
  5. Rnd() * Max( 40 % 9, Mod( 17, 12 ) );
  6. Rnd() * Min( Rnd() * 15, Rnd() * 12 );

 

<< Previous: Lesson Summary | Next: How Did You Do? >>