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 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();
the total of the troll and ogre's heights
What is the symbol for multiplication?
*
What is the symbol for finding the remainder?
%
Given the variable cost, how would you find tip that is 15% of cost?
Double tip = cost*0.15;
What is the value of 15 / 4?
3 (integer division doesn't have any decimal portion.)
What is the value of 20%5
0 (there is no remainder.)
Please review the material for any questions you miss.