Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

N5 SDD

Total questions: 9

Worksheet time: 5mins

Name
Class
Date
1.

You are to create a program that asks the user to enter their date of birth, the program will then tell the user how many days they have been alive for.

What is the input/process/output for this scenario

a)

Input:Date of Birth

Process: calculate number of days between DOB and today

Output: Number of days alive

b)

Input:Date of Birth

Process: Number of days alive

Output: calculate number of days between DOB and today

c)

Input:Date of Birth

Process: Subtraction

Output: Age

d)

Input:Age

Process: Subtraction

Output: Days alive

2.

Select the logical operator

a)

FOR

b)

While

c)

AND

d)

=

3.

Select the logical operator below

a)

IF

b)

WHILE

c)

OR

d)

SELECT

4.

Choose the logical operator

a)

:

b)

NULL

c)

NOT

d)

WHERE

5.

Select all the pre-defined functions

a)

Round

b)

Length

c)

Random

d)

WHILE

6.

What is the correct code to generate a random number between 1 and 10

a)
b)
c)
d)
7.

This is correct input validation

a)

TRUE

b)

FALSE

8.

Input validation requires what kind of loop

a)

WHILE

b)

FOR

c)

IF

d)

LOOP

9.

This code will calculate the length of the string stored in the variable name_length

a)

True

b)

False