Syed: IGCSE Computer Science: Program Logic

Syed: IGCSE Computer Science: Program Logic

9th Grade

33 Qs

quiz-placeholder

Similar activities

CB30: Unit 2 Test Review

CB30: Unit 2 Test Review

9th - 12th Grade

34 Qs

AP Computer Science Final Review

AP Computer Science Final Review

9th - 12th Grade

28 Qs

Unit 8 CodeHS Computer Science Essentials

Unit 8 CodeHS Computer Science Essentials

9th - 12th Grade

35 Qs

BCHS Y9 Python Topic 6 Quiz

BCHS Y9 Python Topic 6 Quiz

9th - 12th Grade

30 Qs

APCSA Unit 4 test

APCSA Unit 4 test

9th Grade

35 Qs

2.2 j277 computer science programming techniques (iteration)

2.2 j277 computer science programming techniques (iteration)

9th - 10th Grade

30 Qs

Final Review - Unit 5

Final Review - Unit 5

9th - 12th Grade

28 Qs

Unit 5 & 6 Review

Unit 5 & 6 Review

9th - 12th Grade

30 Qs

Syed: IGCSE Computer Science: Program Logic

Syed: IGCSE Computer Science: Program Logic

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Syed M

Used 9+ times

FREE Resource

33 questions

Show all answers

1.

DROPDOWN QUESTION

1 min • 5 pts

Write a program that asks the user to input a number, if the number is less than 10, it outputs the message "Too small" otherwise, "Valid".

OUTPUT ("Enter a Number")

​ (a)  

​ (b)  

OUPUT ("Too small")

​ (c)  

OUPUT ("Valid")

​ (d)  

INPUT Number
IF Number < 10 THEN
ELSE
ENDIF
IF Number > 10 THEN
IF Number == 10 THEN
NEXT Number
FOR Number<10 THEN

2.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code that finds the smallest number input by the user, using the WHILE loop.

​ (a)  

Number 1

​ (b)  

​ (c)  

​ (d)  

​ (e)  

ENDIF

ENDWHILE

Minimum← 9999
WHILE Number >=1 DO
INPUT Number
Minimum ← Number
Minimum ← 0
INPUT Minimum
IF Number < Minimum THEN
WHILE Minimum >=10 DO

3.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code that finds the largest number input by the user, using the WHILE loop.

​ (a)  

Number 1

​ (b)  

​ (c)  

​ (d)  

​ (e)  

ENDIF

ENDWHILE

Max← -9999
WHILE Number >=1 DO
INPUT Number
Max← Number
INPUT Max
IF Number >= Max THEN
WHILE Max >=9999 DO
Max← 9999

4.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code that finds the average of the numbers input by a user:

​ (a)  

Total0

Number ← 1

​ (b)  

OUTPUT("Enter a number or 0 to stop")

​ (c)  

​ (d)  

​ (e)  

ENDWHILE

OUTPUT (Total/Count)

Count← 0
INPUT Number
Total← Total + Number
INPUT Count
WHILE Max >=9999 DO
Total← Total+1
WHILE Number >= 1 DO
Count← Count + 1

5.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code that checks if a number input by the user is higher than 1 and less than 10.

OUTPUT("Enter a Number between 1 and 10")

​ (a)  

​ (b)  

OUTPUT("Number is between 1 and 10.") ​

​ (c)  

OUTPUT ("Number is not between 1 and 10.")

​ (d)  

ELSE
IF Number >= 1 AND Number <= 10 THEN
INPUT Number
ENDIF
IF Number <1 OR Number > 10 THEN
BREAK
ENDWHILE

6.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code to print the first 10 natural numbers.

​ (a)  

​ (b)  

OUTPUT(i)

​ (c)  

ENDWHILE

i ← 1
i ← i + 1
WHILE i <= 10 DO
i ← 0, i ← i + 1, WHILE i < 10 DO
WHILE i >= 10 DO
i ← i + i,

7.

DROPDOWN QUESTION

1 min • 5 pts

Complete the code to display all even numbers between 1 and 20.

i ← 2

WHILE i <= 20 DO

​ (a)  

​ (b)  

ENDWHILE

i ← i + 1
i ← i + 2
OUTPUT(i)
FOR x ←0 TO 20 STEP 2

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?