alice mathA Little Math

A Little Math

Learn Alice in FREE step-by-step lessons.

Unit II: Creating Code

In this lesson, you will use arithmetic operators to do some simple math.

In this chapter, you will learn how to perform simple mathematical calculations in Alice using arithmetic operators. You will also learn how to create and use a counter to keep track of how many times an action occurs and how to calculate a total by adding values as a program runs. These skills will help you use numbers and calculations to control and add functionality to your Alice programs.

Objectives:

Please study the material at each of the links below.

  1. Cost of 3 Soccer Balls Cost of 3 Soccer Balls: How much does one soccer ball cost? Then 3 would cost total=cost * 3
  2. Counters Counters: Penguins count using counter=counter+1
  3. The Witch is Older The Witch is Older: What ever age you say you are, the witch says she's older.
  4. The fish share the gold coins The fish share the gold coins: Learn about division and remainders.
  5. Integer Division Drill Integer Division Drill: Practice integer division.
  6. Remainder Drill Remainder Drill: Practice finding remainders.
  7. Finding a Tip Finding a Tip: The Mad Hatter calculates 15% tip.
  8. Cost of 3 different items Cost of 3 different items: Finds the total of 3 different values: total=total+cost
  9. Monkey jumps for banana Monkey jumps for banana: Monkey jumps a bit higher each time by multiplying variable by 1.3
  10. How far is the cave? How far is the cave?: We use a function to find how far away something is.
  11. How tall is the snow-woman? How tall is the snow-woman?: We use a function to find height.
  12. Move the bunny to look in the gopher hole Move the bunny to look in the gopher hole: We use a function to find distance.
  13. Calculate Distance to Move Skater Calculate Distance to Move Skater: Distance to move to be next to something
  14. Writing functions Writing functions: Create a function to get distance to move next to something
  15. Self-Study Questions Self-Study Questions: What have you learned?
  16. Active Learning Active Learning: Practice what you have learned
  17. Discussion questions Discussion questions: What do you think?
GlossaryGlossary for A Little Math
Full Glossary