Lab, Chapter 2

 

 

Name:  _________________________________________

 

Date:     _________________________________________

 

 

Exercises from Chapter 2

 

 

For each of the following exercises, create a storyboard and then translate the storyboard to a program. Include at least one comment in your program. When completed, demo the world to the TA or your instructor.

 

1. Complete Exercise 4 (Circling Fish).  ____________________  

 

2. Complete Exercise 5 (Tortoise Gets a Cookie). ____________________   

 

Extra for Experts

 

3. Complete Exercise 6 (Magnet Fun). _____________________

 

Concept Questions (Short answer)

 

4. Describe each of the four steps used in the process of creating a computer program.

 

 

 

 

 

5. (a) What is an algorithm?

 

 

   (b) In what way is an algorithm related to a program?

 

 

 

6. Textual storyboards are written in a particular format. Describe the format and give an example to illustrate your description.

 

 

7. (a) Describe what is meant by the term method.

 

 

   (b) What does a method define?

 

 

8.  What is meant by the phrase "one block of code can be nested in another"?

 

 

9.  How do you know whether a computer program has a bug?

 

 

10.  What is the purpose of a set instruction?

 

 

11.  If comments are ignored by Alice then why do we add comments to our programs?

 

 

12.  What built-in method is used to:

      (a) change the orientation of an object

 

      (b) display a comic-book style text bubble on the screen

 

      (c) synchronize the movement of one object to the movement of another

 

 

 

 

 

1