wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Pascal Basic

Total questions: 66

Worksheet time: 34mins

Name
Class
Date
1.

What section of a Pascal program is used to declare variables and assign data types? ......

a)

BEGIN

b)

CONST

c)

VAR

d)

TYPE

2.

The actual instructions for the program to run can be found after _____________

a)

The 'WRITELN' statement

b)

The 'VAR' statement

c)

The 'BEGIN' statement

d)

The 'CONST' statement

3.

Which of the following is a valid Pascal output statement?

a)

print('Hello Class!');

b)

println('Hello Class!');

c)

write("Hello Class!');

d)

writeln('Hello Class!');

4.

What is this ( := )?

a)

The equal sign

b)

The assignment operator

c)

The assignment sign

d)

The equal operator

5.

In the programming language Pascal, which of the following is NOT a standard data type?

a)

floating point

b)

char

c)

boolean

d)

integer

6.

What would be the result of the following Pascal statement?

write( 'Total is', 20 );

a)

Total 20

b)

Total = 20

c)

20

d)

Total is 20

7.

Which statement is the correct one for input in Pascal?

a)

input(num);

b)

scanf(num)

c)

readln(num);

d)

inputln(num);

8.

Which is the correct variable declaration statement?

a)

name := string;

b)

string : name;

c)

name : string;

d)

string := name;

9.

Why do we use indentation in our program's code?

a)

We have nothing better to do

b)

It makes the program easier to understand

c)

It's exciting

d)

It makes the program more accurate

10.

A variable that stores a collection of characters such as word, phrase or sentence is a(n):

a)

integer

b)

string

c)

number

d)

character

11.

What are the three basic programming constructs?

a)

Sequence, selection and iteration

b)

Sequence, selection and looping

c)

Sequence, iteration and looping

d)

Sequence, execution and selection

12.

Which of the following statements implement definite iteration?

a)

​STOP UNTIL

b)

FOR ENDFOR

c)

REPEAT UNTIL

d)

WHILE ENDWHILE

13.

What are the two possible results of testing a condition?

a)

YES and NO​

b)

POSITIVE and NEGATIVE

c)

​TRUE and FALSE​

d)

0 or 1

14.

Which logical operator represents greater than?

a)

<

b)

>

c)

>=

d)

==

15.

Which data type represents whole numbers?

a)

Real

b)

String

c)

Integer

d)

Float

16.

What is a constant?

a)

A value that does not usually change as a program is running

b)

A variable with more than one data type

c)

A named piece of memory that holds a value which usually changes as a program is running

d)

A named piece of memory that holds a value which cannot be changed as a program is running

17.

What is recorded in a test/trace table?

a)

Evidence of successful tests

b)

Evidence of failed tests

c)

Evidence of testing

d)

Evidence the program run

18.

What is an algorithm?

a)

How to make a jam sandwich

b)

A way to solve a problem

c)

instructions

d)

Step by step instructions to solve a problem

19.

Code repeated / looped until a condition has been met or a set number of times.

a)

Iteration

b)

While...

c)

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never

the end is never...

d)

For...

20.

What is the % used for in Pascal?

a)

Integer division

b)

Give the whole number

c)

To give the remainder

d)

Give the decimal only 

21.

What is the symbol for flow in a flowchart?

a)

Arrow

b)

Rectangle

c)

Paralellogram

d)

Oval

22.

What is the shape for process in a flowchart?

a)

Arrow

b)

Rectangle

c)

Paralellogram

d)

Oval

23.

What is the shape for Start/End in a flowchart?

a)

Arrow

b)

Rectangle

c)

Paralleogram

d)

Oval

24.

What is the shape for input/output in a flowchart?

a)

Arrow

b)

Rectangle

c)

Paralellogram

d)

Oval

25.

What is the shape for decision in a flowchart?

a)

Arrow

b)

Rectangle

c)

Paralleogram

d)

Diamond

26.

What is the shape is used for continuing a flowchart on another part of the part, or on another page?

a)

Arrow

b)

Rectangle

c)

Paralellogram

d)

Circle

27.

What is an algorithm?

a)

A representation of a program

b)

A finite series of steps used to solve a problem

c)

An infinite series of steps used to solve a problem

d)

1's and 0's

28.

What is the value of 4%2?

a)

0

b)

1

29.

What is the value of 7%2?

a)

0

b)

1

30.

What is the value of 28%7?

a)

0

b)

1

31.

What is the value of 10%3?

a)

0

b)

3

c)

1

32.

What is the value of 20/5

a)

100

b)

2

c)

4

d)

5

33.

What is the value of 44/11

a)

10

b)

2

c)

6

d)

4

34.

What is the value of 6*6

a)

81

b)

38

c)

36

d)

42

35.

What value does 6>=2 give?

a)

True

b)

False

36.

What is the output of this snippet of code?

x := true

y := false 

writeln(x)

a)

True

b)

False

c)

x

d)

y

37.

What is the output of this snippet of code?

x := true

y := false 

writeln('x')

a)

True

b)

False

c)

x

d)

y

38.

What is the output of this snippet of code?

x := true

y := false 

writeln('y')

a)

True

b)

False

c)

x

d)

y

39.

What is the output of this snippet of code?

x := true

y := false 

writeln(y)

a)

True

b)

False

c)

x

d)

y

40.

What is the statement to check if a number is even?

a)

if(num=even)

b)

if(num%2 = 0)

c)

if(2%num=0)

d)

if(even=num)

41.

What is the statement to check if a number is odd?

a)

if(num=odd)

b)

if(num%2 = 1)

c)

if(2%num=1)

d)

if(even=odd)

42.

What is the code to check if a number is a factor of 23?

a)

if(factor=23)

b)

if(num%23=0)

c)

if(23%num=1)

d)

if(23%num=0)

43.

What data type would you use to hold the number 3

a)

integer

b)

real

c)

boolean

d)

string

44.

What data type would you use to hold the number -40

a)

integer

b)

real

c)

boolean

d)

string

45.

What data type would you use to hold the number 3.14

a)

integer

b)

real

c)

boolean

d)

string

46.

What data type would you use to hold the statement "Hello World"

a)

integer

b)

real

c)

boolean

d)

string

47.

What data type would you use to store, true

a)

integer

b)

real

c)

boolean

d)

string

48.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
49.
What does this shape represent?
a)
Decission
b)
Process
c)
Input/Output
d)
Start/End
50.
What's missing ?
a)
On/Off
b)
Pink/Blue
c)
Hello/Goodbye
d)
Yes/No
51.
What command is this shape for?
a)
References another part of the program
b)
Data that is going in as input or coming out as output
c)
Processing something - a calculation or storing something into a variable
d)
Shows the direction of the program
52.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
53.
What is the difference between a flowchart and pseudocode? 
a)
A flowchart is diagramatic whilst pseudocode is written in a programming language (eg. Pascal or Java) 
b)
A flowchart is textual but pseudocode is diagrammatic 
c)
A flowchart is a diagrammatic description of an algorithm whilst pseudocode is a textual description of an algorithm 
d)
A flowchart and pseudocode are the same thing 
54.
What does this symbol mean?
<
a)
Greater Than
b)
Less Than
55.
What is this ?
a)
Pseudocode
b)
Flow chart
c)
Syntax
56.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
What is the value of the variable?
a)
10
b)
=
c)
distanceToSchool
57.
Which of the following assignment statements is assigning text.
a)
myName = "David"
b)
myAge = 21
58.

What’s an algorithm?

a)

A set of step-by-step instructions to resolve a problem

b)

An algorithm is a type of diagram

c)

Patterns and trends used to solve a problem

d)

A programming language

59.

What problem would you solve with an algorithm?

a)

Study

b)

Music

c)

Math

d)

All of the above.

60.

How can't an algorithm be represented?

a)

As a flowchart

b)

As pseudocode

c)

Coding

d)

As a flowchart or pseudocode

61.

Which picture can be best described as the principle of "algorithm"?

a)
b)
c)
d)
62.
What does this shape represent in flowchart?
a)
Input/Output
b)
Process
c)
Decision
d)
Start/Stop
63.
If ................then ....else ........endif  check
a)
0ne condition
b)
two conditions
c)
threee condtions
d)
many conditions
64.
What is a flowchart?
a)
A textual representation of algorithms.
b)
A graphical representation of algorithms.
c)
A cluster of different shapes.
d)
A program code written in Logo.
65.
What are the three algorithm constructs? 
a)
Sequence, selection, repetition 
b)
Input, output, process 
c)
Input/output, decision, terminator    
d)
Loop, input/output, process    
66.
Another word for repetition
a)
iteration
b)
flow
c)
input
d)
control flow