4. Flowcharts Area of a rectangle

The pseudocode below calculates the area of a rectangle given the length and width of the sides.
When calculating the area, the value is put in the variable, A.
This is known as assignment. A value is assigned to the variable, A.
A    l * w can be read out as “A gets l times w”.
ALGORITHM rectangleArea()

BEGIN
    INPUT l, w
    A  ←  l * w
    PRINT A
END
The new shape in the flowchart (Compute A = l x w), is for a process, such as calculating the value of a variable using a formula and storing it for later use.
../_images/area_rectangle.png


Tasks

  1. What shape is used to calculate the area using length and width?

  2. In the pseudocode above, what symbol is used for multiplication?

  3. In the pseudocode above, what symbol is used for assignment?

  4. From the flowchart, what common maths symbol does this assignment symbol replace?

What shape is used to calculate the area using length and width?

A rectangle.

In the pseudocode above, what symbol is used for multiplication?

*

In the pseudocode above, what symbol is used for assignment?

From the flowchart, what common maths symbol does this assignment symbol replace?

=