NEW
Font size
WorksheetsPascal Basic
Total questions: 66
Worksheet time: 34mins
What section of a Pascal program is used to declare variables and assign data types? ......
BEGIN
CONST
VAR
TYPE
The actual instructions for the program to run can be found after _____________
The 'WRITELN' statement
The 'VAR' statement
The 'BEGIN' statement
The 'CONST' statement
Which of the following is a valid Pascal output statement?
print('Hello Class!');
println('Hello Class!');
write("Hello Class!');
writeln('Hello Class!');
What is this ( := )?
The equal sign
The assignment operator
The assignment sign
The equal operator
In the programming language Pascal, which of the following is NOT a standard data type?
floating point
char
boolean
integer
What would be the result of the following Pascal statement?
write( 'Total is', 20 );
Total 20
Total = 20
20
Total is 20
Which statement is the correct one for input in Pascal?
input(num);
scanf(num)
readln(num);
inputln(num);
Which is the correct variable declaration statement?
name := string;
string : name;
name : string;
string := name;
Why do we use indentation in our program's code?
We have nothing better to do
It makes the program easier to understand
It's exciting
It makes the program more accurate
A variable that stores a collection of characters such as word, phrase or sentence is a(n):
integer
string
number
character
What are the three basic programming constructs?
Sequence, selection and iteration
Sequence, selection and looping
Sequence, iteration and looping
Sequence, execution and selection
Which of the following statements implement definite iteration?
STOP UNTIL
FOR ENDFOR
REPEAT UNTIL
WHILE ENDWHILE
What are the two possible results of testing a condition?
YES and NO
POSITIVE and NEGATIVE
TRUE and FALSE
0 or 1
Which logical operator represents greater than?
<
>
>=
==
Which data type represents whole numbers?
Real
String
Integer
Float
What is a constant?
A value that does not usually change as a program is running
A variable with more than one data type
A named piece of memory that holds a value which usually changes as a program is running
A named piece of memory that holds a value which cannot be changed as a program is running
What is recorded in a test/trace table?
Evidence of successful tests
Evidence of failed tests
Evidence of testing
Evidence the program run
What is an algorithm?
How to make a jam sandwich
A way to solve a problem
instructions
Step by step instructions to solve a problem
Code repeated / looped until a condition has been met or a set number of times.
Iteration
While...
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...
For...
What is the % used for in Pascal?
Integer division
Give the whole number
To give the remainder
Give the decimal only
What is the symbol for flow in a flowchart?
Arrow
Rectangle
Paralellogram
Oval
What is the shape for process in a flowchart?
Arrow
Rectangle
Paralellogram
Oval
What is the shape for Start/End in a flowchart?
Arrow
Rectangle
Paralleogram
Oval
What is the shape for input/output in a flowchart?
Arrow
Rectangle
Paralellogram
Oval
What is the shape for decision in a flowchart?
Arrow
Rectangle
Paralleogram
Diamond
What is the shape is used for continuing a flowchart on another part of the part, or on another page?
Arrow
Rectangle
Paralellogram
Circle
What is an algorithm?
A representation of a program
A finite series of steps used to solve a problem
An infinite series of steps used to solve a problem
1's and 0's
What is the value of 4%2?
0
1
What is the value of 7%2?
0
1
What is the value of 28%7?
0
1
What is the value of 10%3?
0
3
1
What is the value of 20/5
100
2
4
5
What is the value of 44/11
10
2
6
4
What is the value of 6*6
81
38
36
42
What value does 6>=2 give?
True
False
What is the output of this snippet of code?
x := true
y := false
writeln(x)
True
False
x
y
What is the output of this snippet of code?
x := true
y := false
writeln('x')
True
False
x
y
What is the output of this snippet of code?
x := true
y := false
writeln('y')
True
False
x
y
What is the output of this snippet of code?
x := true
y := false
writeln(y)
True
False
x
y
What is the statement to check if a number is even?
if(num=even)
if(num%2 = 0)
if(2%num=0)
if(even=num)
What is the statement to check if a number is odd?
if(num=odd)
if(num%2 = 1)
if(2%num=1)
if(even=odd)
What is the code to check if a number is a factor of 23?
if(factor=23)
if(num%23=0)
if(23%num=1)
if(23%num=0)
What data type would you use to hold the number 3
integer
real
boolean
string
What data type would you use to hold the number -40
integer
real
boolean
string
What data type would you use to hold the number 3.14
integer
real
boolean
string
What data type would you use to hold the statement "Hello World"
integer
real
boolean
string
What data type would you use to store, true
integer
real
boolean
string
<
distanceToSchool = 10
What is the value of the variable?
What’s an algorithm?
A set of step-by-step instructions to resolve a problem
An algorithm is a type of diagram
Patterns and trends used to solve a problem
A programming language
What problem would you solve with an algorithm?
Study
Music
Math
All of the above.
How can't an algorithm be represented?
As a flowchart
As pseudocode
Coding
As a flowchart or pseudocode
Which picture can be best described as the principle of "algorithm"?
