Font size
S
M
L
XL
WorksheetsProgramming Quiz Y10
Total questions: 100
Worksheet time: 2hrs 33mins
Name
Class
Date
1.
In programming 'Selection' means...
a)
The path through the program is carried out in order one instruction after another
b)
The path through the program is decided by looking at a condition then following a path based on that condition
c)
The program completes a set of instructions several times until a condition is met
d)
The program completes a set of instructions a specific number of times
2.
In programming 'Sequence' means...
a)
The path through the program is carried out in order one instruction after another
b)
The path through the program is decided by looking at a condition then following a path based on that condition
c)
The program completes a set of instructions several times until a condition is met
d)
The program completes a set of instructions a specific number of times
3.
In programming 'Iteration' means...
a)
The path through the program is carried out in order one instruction after another
b)
The path through the program is decided by looking at a condition then following a path based on that condition
c)
The program completes a set of instructions several times until a condition is met
d)
The path through the program is carried out in order one instruction after another but in reverse
4.
In programming a 'FOR' loop can best be described by...
a)
The path through the program is carried out in order one instruction after another
b)
The path through the program is decided by looking at a condition then following a path based on that condition
c)
The program completes a set of instructions several times until a condition is met
d)
The program completes a set of instructions a specific number of times
5.
In programming a 'WHILE' loop can best be described by...
a)
The path through the program is carried out in order one instruction after another
b)
The path through the program is decided by looking at a condition then following a path based on that condition
c)
The program completes a set of instructions until a condition is met
d)
The program completes a set of instructions a specific number of times
6.
What does this flowchart symbol represent?
a)
data input / output
b)
start / end
c)
decision
d)
wait
7.
What does this flowchart symbol represent?
a)
data input / output
b)
decision
c)
start / end
d)
process / sequence
8.
What does this flowchart symbol represent?
a)
process / sequence
b)
decision
c)
start / end
d)
wait
9.
What does this flowchart symbol represent?
a)
start / end
b)
process / sequence
c)
data input / output
d)
wait
10.
Software has to be provided to the processor in ...
a)
Python Language
b)
Machine Code
c)
Binary
d)
Assembly Language
11.
Pseudocode is...
a)
...the same as the Python programming language.
b)
...used to describe a language which does not exist and tries to copy other programming languages.
c)
...used to describe the program structures and data flow in a structured form of English similar to a programming language.
d)
different to Python and does not use any of the same commands.
12.
High Level programming languages (like Python) can ' multiply two numbers together in one command'
a)
TRUE
b)
FALSE
13.
An 'Assembler' ...
a)
...gives precise and direct instructions to the computer.
b)
...give instructions to the software program
c)
...executes one statement at a time within programming code.
d)
...compiles the code into one file then runs the program.
14.
An 'Compiler' ...
a)
...gives precise and direct instructions to the computer.
b)
...give instructions to the software program
c)
...executes one statement at a time within programming code.
d)
...compiles the code into one file then runs the program.
15.
An 'Interpreter' ...
a)
...gives precise and direct instructions to the computer.
b)
...give instructions to the software program
c)
...executes one statement at a time within programming code.
d)
...compiles the code into one file then runs the program.
16.
Which is the correct data type for the following piece of data?
2.4
2.4
a)
Integer
b)
String
c)
Float (Real number)
d)
Boolean
17.
Which is the correct data type for the following piece of data?
10
10
a)
Integer
b)
String
c)
Float (Real number)
d)
Boolean
18.
Which is the correct data type for the following piece of data?
"Hello"
"Hello"
a)
Integer
b)
String
c)
Float (Real number)
d)
Boolean
19.
Which is the correct data type for the following piece of data?
TRUE
TRUE
a)
Integer
b)
String
c)
Float (Real number)
d)
Boolean
20.
In programming, a 'VARIABLE' is...
a)
...a named storage space reserved in memory for a piece of data, which can change during the life of the program.
b)
...a piece of code which changes constantly
c)
...a names storage space reserved for a piece of data which does not change within the program.
d)
...a variable which does not change.
21.
In programming, a 'CONSTANT' is...
a)
...a named storage space reserved in memory for a piece of data, which can change during the life of the program.
b)
...a piece of code which changes constantly
c)
...a names storage space reserved for a piece of data which does not change within the program.
d)
...a variable which does not change.
22.
Identify the correct comparison operator...
"="
"="
a)
Equal to.
b)
Greater or equal to.
c)
Less than or equal to.
d)
Not equal to.
23.
Identify the correct comparison operator...
"<>"
"<>"
a)
Equal to.
b)
Greater or equal to.
c)
Less than or equal to.
d)
Not equal to.
24.
Identify the correct comparison operator...
">="
">="
a)
Equal to.
b)
Greater or equal to.
c)
Less than or equal to.
d)
Not equal to.
25.
Identify the correct comparison operator...
"!="
"!="
a)
Equal to.
b)
Greater or equal to.
c)
Less than or equal to.
d)
Not equal to.
26.
Identify the correct comparison operator...
"<="
"<="
a)
Equal to.
b)
Greater or equal to.
c)
Less than or equal to.
d)
Not equal to.
27.
What is the correct definition of 'an array'?
a)
A set of constants with the same name (or identifier) and an index number to identify each variable.
b)
A set of variables with the same name (or identifier) and an index number to identify each variable.
c)
A set of variables with different names (or identifiers) and an index number.
d)
A set of variables with the same name (or identifier) without any index numbers to identify each variable.
28.
When programming, you can use an IDE. What does IDE stand for?
a)
Interpreted Diagram Explanation
b)
Integrated Diagram Environment
c)
Integrated Development Environment
d)
Integrated Deconstruction Environment
29.
A Logic Error is when a program...
a)
Stops immediately an raises an exception
b)
Stops immediately and reports and error
c)
Continues to run but does not give the correct answer
d)
Continues to run and raises an error report
30.
A Syntax Error is when...
a)
A command word has been spelt correctly
b)
A command word has been spelt correctly, and the program fails
c)
A command word is missing but the program still runs
d)
A command word has been spelt incorrectly, and the program halts.
31.
In python what do you type if you want to see if 2 things are the same?
a)
=
b)
==
c)
!=
d)
>
32.
In python what do you type if you want to change the value of a variable?
a)
=
b)
==
c)
!=
d)
>
33.
Which of these Python words is an example of a selection statement?
a)
if
b)
print
c)
input
d)
name
34.
What is wrong with this python code?
if name == "Mr Little"
print ("Hello")
if name == "Mr Little"
print ("Hello")
a)
No colon (:) at the end of the line
b)
You should use = not ==
c)
The second line is not indented
d)
print is not correct
35.
what is wrong with this Python code?
name = "Mr Little"
username = input ("What is your name?")
if Name == username:
print ("Hello sir")
name = "Mr Little"
username = input ("What is your name?")
if Name == username:
print ("Hello sir")
a)
name and Name are not the same
b)
You should use = to compare, not ==
c)
There is no colon (:) at the end of the if
d)
The print command is not indented.
36.
A step-by-step set of rules or instructions
a)
Algorithm
b)
Pseudocode
c)
Conditional Code
d)
Logical Operator
37.
A value that can only be either true or false
a)
While Loop
b)
De-Bugging
c)
Boolean
d)
Function
38.
Runs a block of code over and over for a set number of times
a)
Command
b)
For Loop
c)
Sequence
d)
Bug
39.
An IF statement can have IF statements inside of it
a)
True
b)
False
40.
An ___ is a type of Selection Statement
a)
Do Until
b)
Loop
c)
IF
d)
Variable
41.
A ____ is a memory address that can hold information
a)
Integer
b)
Double
c)
String
d)
Variable
42.
A _____ can hold letters and number
a)
Integer
b)
String
43.
What needs to go in to check the age is more than 5
IF ______ Then
Console.Writeline ("You are older than 5")
IF ______ Then
Console.Writeline ("You are older than 5")
a)
Age > 5
b)
Age < 5
c)
Age is more than 5
d)
Age = 5
44.
The Python IDLE is basically a _______ editor that lets you execute Python code.
a)
image
b)
code
c)
file
d)
text
45.
Python is _____ sensitive which means you must use the same indentation every time
a)
space
b)
color
c)
code
d)
word
46.
______ has one function, to output to the console (screen) whatever is inside the parentheses
a)
import
b)
input
c)
print
d)
int
47.
Comments help the programmer make ________ within the program without affecting the code.
a)
notes
b)
changes
c)
revisions
d)
a mess
48.
Which Python statement will check to see if a is greater than b?
a)
if a > b:
b)
if (a > b)
c)
if a is greater than b
d)
if a >= b:
49.
Which statement will check to see if a is equal to b?
a)
if a == b
b)
if a = b:
c)
if a != b:
d)
if a == b:
50.
What will the lines of code print?
a)
A
b)
B C
c)
A B C
d)
A C
51.
What will the following lines of code print?
a)
A
b)
B C
c)
A B C
d)
Nothing, it will return an error.
52.
What will the following lines of code print?
a)
A
b)
B C
c)
A C
d)
Nothing, it will return an error.
53.
What will the following lines of code do?
a)
A
b)
B C
c)
A C
d)
Nothing, it will return an error
54.
What will the following lines of code do?
a)
a
b)
1 2 3 4 5
c)
1 2 3 4
d)
Nothing since we don't know what a equals.
55.
Like every programming language Python has __________ which help to carry out math functions.
a)
syntax
b)
codes
c)
operators
d)
symbols
56.
What type of brackets do you use to denote a list in Python.
a)
[ ]
b)
( )
c)
{ }
d)
> <
57.
What type of brackets do you use to recall a variable in Python.
a)
[ ]
b)
( )
c)
{ }
d)
> <
58.
a line of text that Python won't try to run as code
a)
comment
b)
modulo
c)
variable
d)
boolean
59.
symbol used for modulo
a)
%
b)
&
c)
#
d)
**
60.
102 = 100
Which of the following is used in Python to calculate ten squared?
Which of the following is used in Python to calculate ten squared?
a)
10 ** 2
b)
10 * 2
c)
10 % 2
d)
10 ** 10
61.
What does the following code do?
Score = Score + 1
Score = Score + 1
a)
Nothing
b)
prints score
c)
Displays 1
d)
adds 1 onto the score
62.
What output would result from the following expression?
print(2 + 3.0)
print(2 + 3.0)
a)
5.0
b)
5
c)
"2 + 3.0"
d)
SyntaxError
63.
Which of the following functions is used to get information from the user of a program?
a)
input()
b)
print()
c)
import
d)
eval()
64.
Look at this code, how many times will it loop?
a)
50
b)
90
c)
0
d)
4
65.
Look at this code, what shape will it make?
a)
Square
b)
Triangle
c)
Rectangle
d)
Hexagon
66.
Look at this code, what is the variable?
a)
0
b)
4
c)
for
d)
i
67.
What is wrong with this code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling
68.
What does this code snippet mean?
a)
Imports a library
b)
Imports a function
c)
Imports a method
d)
Buys a turtle from pets at home
69.
What must you do every time you write to a file?
a)
open and close it
b)
ask it nicely
c)
open it
d)
close it
70.
list=["edam", "cheese", "dairylee"]
Which command will correctly print "cheese"?
Which command will correctly print "cheese"?
a)
print(list[0])
b)
print(list(1))
c)
print(list[1])
d)
print(list(0))
71.
list=["edam", "cheese", "dairylee"]
Which command will correctly print "dairylee"?
Which command will correctly print "dairylee"?
a)
print(list[-1])
b)
print(list(-1))
c)
print(list,-1)
d)
print(list(-0))
72.
Is this code an example of...
a)
Sequence
b)
Selection
c)
Iteration
d)
None of the above
73.
Is this code an example of...
a)
Sequence
b)
Selection
c)
Iteration
d)
None of the above
74.
Is this code an example of...
a)
Sequence
b)
Selection
c)
Iteration
d)
None of the above
75.
Is this code an example of...
a)
Sequence
b)
Selection
c)
Selection and Sequence
d)
Iteration
76.
In binary there are ____ numbers that can be used in each number column
a)
16
b)
2
c)
8
d)
10
77.
A DENARY number is base _____
a)
2
b)
10
c)
16
d)
20
78.
The biggest number you can make with 4 binary digits is _____
a)
15
b)
14
c)
13
d)
16
79.
Denary 28 = Binary ______
a)
11100
b)
11011
c)
10101
d)
11110
80.
Denary 5 = Binary ______
a)
101
b)
011
c)
111
d)
110
81.
Hexadecimal is a base _____ number system
a)
10
b)
2
c)
16
d)
6
82.
Which 127 bit system is used by the computer to represent text?
a)
Floating point
b)
Binary
c)
ASCII
d)
RTF
83.
Which database field type would be used to store a customer's account balance?
a)
Numeric
b)
Object
c)
Currency
d)
Text
84.
How does a computer process instructions?
a)
By converting it into binary
b)
By splitting the instruction up into an operand and an operator
c)
By changing the format of a file
d)
By magic
85.
What is an operator in computing?
a)
A mathematical operator
b)
Something that can be done to a file
c)
Something that tells the computer what the instruction is
d)
Something that will change the format of a file
86.
What is an operand in computer?
a)
Something that tells the computer what to apply the instruction to.
b)
Something that changes the format of a file
c)
Something that can be done to a file
d)
A method of translating text into binary
87.
What is the number 10 in binary?
a)
1010
b)
1111
c)
0001
d)
0110
88.
What is the hexadecimal number FF in denary?
a)
255
b)
256
c)
254
d)
257
89.
Name the logic gate
a)
AND
b)
OR
c)
NOT
90.
Name the logic gate
a)
AND
b)
OR
c)
NOT
91.
The +,-,*,/,++,--, and & % operators are what kind of operators?
a)
Arithmetic
b)
Comparison
c)
Logical
d)
none of these
92.
The ==, !=, < <=, >, and >=,operators are what kind of operators?
a)
Arithmetic
b)
Comparison
c)
Logical
d)
none of these
93.
What kind of statement is this?
blue button <= green button
blue button <= green button
a)
Comparative
b)
Conditional
c)
Operational
d)
Logical
94.
What kind of statement is this?
If a player clicks a green button, add 5 points
If a player clicks a green button, add 5 points
a)
Comparative
b)
Conditional
c)
Operational
d)
Logical
95.
Which of these variables uses numbers that do contain a decimal (example: 1.32 or 19.14)
a)
Boolean
b)
String
c)
Integer
d)
Floating Point
96.
Which of these variables uses whole numbers that do not contain a decimal (example: 132 or 1,914)
a)
Boolean
b)
String
c)
Integer
d)
Floating Point
97.
Which of these variables uses a single letter or symbol (example: k or %)
a)
Character
b)
String
c)
Integer
d)
Floating Point
98.
Which of the three Boolean operators gives you MORE results?
a)
AND
b)
OR
c)
NOT
d)
All of the above
99.
Which is the most commonly used Boolean operator?
a)
AND
b)
OR
c)
NOT
d)
They're all used the same amount
100.
When using Boolean operators, which is the one where the order of your search matters?
a)
AND
b)
OR
c)
NOT
d)
It matters for all of them
Reset
