AllTheTimeWorld.com

alice mathAlice Programming

Alice Programming

Learn Alice in FREE step-by-step lessons.

Quiz on A Little Math

After watching the videos in the section, you should understand how to do some simple arithmetic operations.

Write down the answers first. Click the check to check your answer.

Given the following code, what would be the value of total after the code is executed?
Double total = 0.0;
total = total+this.troll.getHeight();
total = total+this.ogre.getHeight(); answer

   the total of the troll and ogre's heights

What is the symbol for multiplication? answer

   *

What is the symbol for finding the remainder? answer

   %

Given the variable cost, how would you find tip that is 15% of cost? answer

   Double tip = cost*0.15;

What is the value of 15 / 4? answer

   3 (integer division doesn't have any decimal portion.)

What is the value of 20%5 answer

   0 (there is no remainder.)

Please review the material for any questions you miss.