0% found this document useful (0 votes)
6 views4 pages

Unit 4 - Pseudocode Assignment

The document outlines a pseudocode assignment for students at Symbiosis International School, focusing on algorithms for various tasks such as counting elements in a collection, sorting names, calculating grades, and determining BMI. It includes specific tasks like storing surnames and first names in separate arrays, implementing bubble sort, and outputting student grades based on marks. Additionally, it requires algorithms to categorize BMI and identify individuals based on their BMI relative to an average.

Uploaded by

Lakshya Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Unit 4 - Pseudocode Assignment

The document outlines a pseudocode assignment for students at Symbiosis International School, focusing on algorithms for various tasks such as counting elements in a collection, sorting names, calculating grades, and determining BMI. It includes specific tasks like storing surnames and first names in separate arrays, implementing bubble sort, and outputting student grades based on marks. Additionally, it requires algorithms to categorize BMI and identify individuals based on their BMI relative to an average.

Uploaded by

Lakshya Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

SYMBIOSIS INTERNATIONAL SCHOOL

DP 1 - Unit 4 - Pseudocode assignment 15th November 2024

1) Construct in pseudocode an algorithm, using the access methods of a collection, which


will iterate through the collection NUMBERS and count how many elements stored in
the collection are in the interval [-1,1]. The final answer should be output.

2) A company has 600 employees whose names are currently stored using a array called
NAMES.
The names are stored as surname, first name. For example: Smith, Jane, Uysal,
Rafael, Ahmed, Ishmael, Jonsonn, Sara, …

2.a) Construct a pseudocode algorithm that will store the surnames in one array and first
names in another. [4]

2.b) Construct a pseudocode algorithm that will sort the surnames into alphabetical order
using the bubble sort method. The order of the first names must also be changed so that they
keep the same index as their corresponding surname. [5]

3) The array DATA_ARR[] is a one-dimensional array of 12 integers.

Input a value to be searched in the array.


4) A teacher would like a simple program to store the names, marks and grades of
students in a set of three parallel one-dimensional arrays called NAME[],
MARK[]andGRADE[] .

The grade boundaries for the individual grades are shown below:

4.a) Construct an algorithm using pseudocode to take the marks that have been stored
in MARK[], convert them into the appropriate grade and store the calculated grades in
GRADE[]. [5]

4.b) Construct an algorithm using pseudocode to output the names and grades of all students
who achieve a grade of Merit or Distinction. [3]

5) The following method, calcBMI()accepts person’s height (H) in metres (m) and weight

(W) in kilograms (kg) and returns their Body Mass Index (BMI).

calcBMI(H, W)

X=H*H

B=W/X

return B

endcalcBMI
Boris weighs 104 kg and is 2.00 m tall. His BMI can be calculated by calling method calcBMI()

as follows

BorisBMI = calcBMI(2.00, 104).

A person can belong to one of the following four weight categories:

The data about a group of adults and their height measurement (in metres) and weight

measurement (in kg) is held in three one-dimensional arrays.

Where

NAMEis a one-dimensional array holding names (currently sorted in alphabetical order).

WEIGHT is a one-dimensional array holding weight measurement in kilograms.


HEIGHTis a one-dimensional array holding height measurement in metres.

For example,

NAME[0]is Annie.

Her weight measurement is 52.40 kg and can be found in WEIGHT[0].

HEIGHT[0]is 1.56 which represents Annie’s height measurement in metres.

1.State the value of variable BorisBMI.

2. Use pseudocode to construct an algorithm which accepts a person’s BMI and outputs the

weight category the person belongs to. [4]

3.State the name of the person whose height is held in HEIGHT[3].

4. Construct an algorithm which will output the names of all the people whose BMI is greater

than this group’s average BMI.

You should call method calcBMI()in your answer. [6]

You might also like