You are on page 1of 7

Year 11, Computer science

Homework, Max Marks = 20

 Complete all the questions and submit it by 13th October, 2023


 Either you can print this worksheet and staple with your notebook or you can directly write
the answers in your notebook along with questions.
 Homework marks will be added to your end of term assessment, term 1

Q1 Write a pseudocode to enter and display names from 1 D arrays?

Start
DECLARE Name_list : ARRAY [1, 5] OF STRING
Name_list  “Hamza”, “Afaq”, “Vroyur”, “Hammad”, “Ehab”
FOR i FROM 1 to 5
OUTPUT Name_list[i]
END FOR
END

[2]
Q2

START
FOR i from 1 to 50
OUTPUT Name[i]
END FOR
END
Q3

Error 1: WHILE Numbers <> 999 DO


Correction: WHILE Number <> 999 DO

Error 2: IF Number > 100


Correction: IF Number >= 100

Error 3: OUTPUT Number (line 8)


Correction: END

Error 4: INPUT Number should be in loop


Correction: END IF
INPUT Number
START

IF Number >= 100 AND <= 200

INPUT Number

OUTPUT Number

END WHILE

END
Q4 write a program code in python, to find out the largest of 3 numbers using functions. Implement
and give the evidence of your code and output. Make sure to print your name in code. [4]

Program code and Output (paste it here in box)


Q6

You might also like