Function Worksheet

 

This worksheet uses the mummyExpressionV2.a2w file saved in the Alice directory on the Java share network drive.

 

 

1.  State 2 functions that are used in this example.

 

 

 

2.  Specify which object these functions reference.

 

 

 

3.  Write the mathematical expression used in the code for this program.

 

 

 

 

 

4.  State another mathematical operator that could have been used in the expression.  How would this alter the animation?

 

 

 

 

 

 

 

5.  Rewrite the code so that the Pharaoh moves to the mummy without colliding.

 

 

 

 

 

6.  What function would you use to find out which object is taller, the Pharaoh or mummy?

 

 

 

 

7.  List two functions that would return a Boolean value.

 

 

 

8.  What types of functions can be found under the proximity subcategory?

 

 

 

 

 

 

9.  State two functions of the mummy object that will return a number.

 

 

 

 

10.  Does the world contain any functions?  List subcategories.

 

 

 

 

11.  Write a statement that will use a camera function.  Explain what this statement will do when the play button is pressed.

 

 

 

 

12.  Explain how you would make the mummy a ghost by altering his transparency.

 

 

 

 

13.  What is the height of the pyramid?  *Hint - Use the print structure *

 

 

 

 

14.  Who is taller the mummy or the Pharaoh?  Explain how you found the answer.

 

 

 

 

 

15.  Use a world function to convert the height of the pyramid to a string so the Pharaoh can say the height.  (Write the code in the space below)