The goal of this lesson is to learn to do calculations, use counters, and find totals.

These calculations will enable you to move the characters more precisely in the Alice virtual world.

In this module, you will use arithmetic operators to move the characters to precise locations, to find totals, and other calculations.

In order to do this you will:

- Build arithmetic expressions.
- Use variables, functions, and assign statements.
- Create code to do calculations using multiple variables and steps.
- Write a function to do calculations.
- Create a function to get distance to move next to something
- Use a loop to add numbers uses a running total: total=total + number

- Counters:
*Using a while loop to count using counter=counter+1* *Cost of 3 Soccer Balls:**How much does one soccer ball cost? total=cost * 3**Cost of 3 different items:**Finds the total of 3 different values: total=total+cost**Calculate Distance to Move:**Distance to move to be next to something**Writing functions:**Create a function to get distance to move next to something**Loop to add numbers:**A loop to add numbers uses a running total: total=total + number**Loop to add numbers and find smallest and largest:**The first value is the smallest and largest so far.**Self Study Questions**Discussion Questions*

Like us on Facebook:

Author: Janet E. Joy; Publisher: Zebra0.com

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Creative Commons Attribution-NonCommercial 4.0 International License

Last modified: May 17 2017 14:11:30.