You must work on this lab with the person
sitting next to you. For each question, the person sitting on the
left must "expand" (by clicking on the double-headed arrow) the
problem/task on the left and the person sitting on the right must
"expand" the problem/task on the right. You must not "expand" or
read the the other problem/task.
After reading your problem/task, you will write an algorithm for completing it
on a piece of paper. Then, you will exchange algorithms with your partner,
and execute your partner's algorithm.
When executing the algorithm, you must follow the instructions
exactly as they are written.
1. Writing Simple Algorithms:
This part of the lab will give you some experience writing simple algorithms.
If you have not already done so, introduce yourself to the person
sitting next to you.
What is your partner's name?
Read and understand one of the following problems/tasks:
Problem/Task for the Person on the Left
Write an un-named algorithm for drawing a square that is 2 inches
on each side.
Problem/Task for the Person on the Right
Write an un-named algorithm for drawing a right triangle that has a base of
2 inches and a height of 3 inches.
Exchange algorithms with your partner.
Without discussing it, execute your partner's algorithm exactly
as it is written (without doing any damage to anything or anyone).
Discuss the problems you had executing your partner's algorithm
with your partner.
What was incorrect or imprecise about your algorithm?
2. Writing Algorithms that Require Input:
This part of the lab will give you some experience writing simple algorithms
that require input. (Hint: Before you start, review the previous
lab and think about what you did with input.)
Read and understand one of the following problems/tasks:
Problem/Task for the Person on the Left
Write an un-named algorithm for drawing a generic right triangle (i.e.,
a right triangle whose size is not determined in advance).
The person executing the algorithm should be instructed to ask
for the base and height of the right triangle.
Problem/Task for the Person on the Right
Write an un-named algorithm for drawing a generic rectangle (i.e.,
a rectangle whose size is not determined in advance).
The person executing the algorithm should be instructed to ask
for the width and height of the rectangle.
Exchange algorithms with your partner.
Without discussing it, execute your partner's algorithm exactly
as it is written (without doing any damage to anything or anyone).
Discuss the problems you had executing your partner's algorithm
with your partner.
What was incorrect or imprecise about your algorithm?
3. Writing Algorithms that Require Calculations:
This part of the lab will give you some experience writing simple algorithms
that require calculations. (Hint: Before you start, review the previous
lab and think about how you used variables in calculations.)
Read and understand one of the following problems/tasks:
Problem/Task for the Person on the Left
Write an un-named algorithm for calculating and displaying the
perimeter of a generic rectangle (i.e., a rectangle whose size is
not determined in advance). The person executing the algorithm
should be instructed to ask for the width and height of the
rectangle.
Problem/Task for the Person on the Right
Write an un-named algorithm for calculating and displaying the area
of a generic right triangle (i.e., a right triangle whose size is
not determined in advance). The person executing the algorithm
should be instructed to ask for the base and height of the right
triangle.
Exchange algorithms with your partner.
Without discussing it, execute your partner's algorithm exactly
as it is written (without doing any damage to anything or anyone).
Discuss the problems you had executing your partner's algorithm
with your partner.
What was incorrect or imprecise about your algorithm?
4. Writing A More Complicated Algorithm:
This part of the lab will give you some experience writing
algorithms that are a little more complicated.
Read and understand one of the following problems/tasks:
Problem/Task for the Person on the Left
Write an un-named algorithm for calculating and displaying the
total area of three shapes: a square, an equilateral triangle,
and a circle. The person executing the algorithm
should be instructed to ask for a single number that will be used
for the length of the sides of the square, the length of the sides of
the triangle, and the radius of the circle. (Note: You may look up
any equations you have forgotten.)
Problem/Task for the Person on the Right
Write an un-named algorithm for calculating and displaying the
total perimeter of three shapes: a square, an equilateral triangle,
and a circle. The person executing the algorithm
should be instructed to ask for a single number that will be used
for the length of the sides of the square, the length of the sides of
the triangle, and the radius of the circle. (Note: You may look up
any equations you have forgotten. Also, recall that the perimeter
of a circle is sometimes called its circumference.)
Exchange algorithms with your partner.
Without discussing it, execute your partner's algorithm exactly
as it is written (without doing any damage to anything or anyone).
Discuss the problems you had executing your partner's algorithm
with your partner.
What was incorrect or imprecise about your algorithm?