0% found this document useful (0 votes)
79 views5 pages

Grade 7 ICT Based On EOS1 Worksheet Unit 2

123123sadasd

Uploaded by

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

Grade 7 ICT Based On EOS1 Worksheet Unit 2

123123sadasd

Uploaded by

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

EOS1 ICT Worksheet Unit 2

Grade 7
Name: Tri Duc
Class: 7B1

INSTRUCTIONS
● Answer all questions.
● Write your answer to each question in the space provided.
● You should show all your working on the question paper.

INFORMATION
● The total of this paper is 40.

1. Consider the following pseudocode:

START
name = "Mason"
age = 11
student = True
phoneNumber = "0832202020"
height = 200.30
IF age == 11 THEN
OUTPUT “Are you in Grade 7?”
STOP

a. State the data types for each variable:


name string
age integer
student boolean
phoneNumber string
height float [5]

b. How can you change the logic of the pseudocode to display “Are you in
Grade 7” if the age is equal to 11 or student is equal to True?
State the Boolean operator (e.g. AND, OR, NOT) in your answer.

………………………………………………………………………………………….
………………………………………………………………………………………[1]

c. How can you change the logic of the pseudocode to display “Are you in
Grade 7” if the age is equal to 11 and height is greater than 140.00?
Give a conditional statement(s) including a Boolean operator in your answer.

………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………[2]
d. Rewrite the pseudocode into Python program code.

………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
………………………………………………………………………………………….
……………………………………………………………………………………….[3]

e. Which part of the development process is writing pseudocode?


Design | Plan | Review and evaluate | Develop | Test

……………………………………………………………………………………….[1]
2. Consider the following pseudocode for a program to determine if an object can fit in a
shipping box.

OUTPUT “This test will determine if your object will fit in our shipping
box.”
object_height = INPUT "Type height (cm) of the object: "
object_length = INPUT "Type length (cm) of the object: "
object_width = INPUT "Type width (cm) of the object: "
IF object_height >= 25 OR object_length >= 100 OR object_width >= 50
THEN
OUTPUT "It will not fit."
ELSE
OUTPUT “It will fit.”
ENDIF
STOP

a. State True or False for the following:

i. Pseudocode should be written in long, complicated and vague lines.


………………….. [1]
ii. In this example, the start and end of the pseudocode is clearly shown.
………………….. [1]
iii. The pseudocode contains no Boolean operator.
………………….. [1]
iv. The pseudocode has appropriate names for each variable.
………………….. [1]

b. State what will be displayed on the screen if the following inputs are provided.

object_height object_length object_width OUTPUT displayed

24 50 40

18 200 2

17 100 49
[3]

c. Rewrite the if-statement from the pseudocode into words.


………………………………………………………………………………………….
……………………………………………………………………………………….[3]
3. Greg is looking for his friend's email address. Greg has a list of everyone in his class
and their email addresses.
a. Name and explain which searching algorithm he can use to find the email
address.
b. Greg is using the linear search to find the email address of his friend, George,
in the list below.

Name Email address

Frik [email protected]

Eddy [email protected]

Sally [email protected]

George [email protected]

Zane [email protected]

State in order all the friend’s emails that are viewed when finding George’s
………………………………………………………………………………………….
……………………………………………………………………………………….[2]

c. Does the list have to be ordered (alphabetical order) for the linear search to
find George’s email address?
………………………………………………………………………………………[1]

4. Consider the following pseudocode:

START
INPUT num1

INPUT num2

INPUT num3

IF ..................................................................................................................TH
EN

OUTPUT "At least one of the inputs is equal to 20"


END IF

STOP
Fill in the blank (above) to make the code work correctly. [3]
5. Consider the following pseudocode:

START
INPUT sound_level
IF sound_level > 100 THEN
OUTPUT "Quiet"
ELSE
OUTPUT "Loud"
END IF
STOP

Using an appropriate range of test data, create a test plan by filling in the blanks in the table below.

Test Input / Test Actual


Expected Result Pass/Fail
ID Scenario Outcome

To be To be
1 .................. .................. determined determined

To be To be
2 .................. .................. determined determined

To be To be
3 .................. .................. determined determined

To be To be
4 .................. .................. determined determined

To be To be
5 .................. .................. determined determined

[5]

[Use normal test data and extreme test data]

6. When making a rock-paper-scissors game provide TWO examples of sub-problems (smaller


problems) that can be thought of when planning and designing the game.

..........................................................................................................................................

..........................................................................................................................................

.............................................................................................................................
.................................................................................................................................... [2]
7. Rewrite the following flowchart algorithm into pseudocode.

.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
...................................................................................................................................[5]

You might also like