Syed: IGCSE Computer Science: Program Logic

Syed: IGCSE Computer Science: Program Logic

9th Grade

33 Qs

quiz-placeholder

Similar activities

Computing 4 the Win

Computing 4 the Win

3rd - 11th Grade

29 Qs

Term 1- Intro to Ag Test Review

Term 1- Intro to Ag Test Review

9th Grade

35 Qs

KHỐI 3 HKII

KHỐI 3 HKII

3rd Grade - University

38 Qs

Scratch

Scratch

9th Grade

28 Qs

Microsoft Office Shortcut Keys

Microsoft Office Shortcut Keys

6th - 12th Grade

29 Qs

Year nine revision for summer assessment

Year nine revision for summer assessment

9th Grade

36 Qs

Networks, Memory & Storage : GCSE

Networks, Memory & Storage : GCSE

9th - 12th Grade

28 Qs

ULANGAN HARIAN INFORMATIKA 1 KELAS VII

ULANGAN HARIAN INFORMATIKA 1 KELAS VII

9th - 12th Grade

30 Qs

Syed: IGCSE Computer Science: Program Logic

Syed: IGCSE Computer Science: Program Logic

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

Syed M

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?