wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

J277 Random Quiz 1

Total questions: 32

Worksheet time: 15mins

Name
Class
Date
1.
In programming, what is iteration?
a)
The repetition of steps within a program
b)
The order in which instructions are carried out
c)
A decision point in a program
d)
Testing a program to make sure it works
2.
Which two statements are used to implement iteration?
a)
IF and WHILE
b)
ELSE and WHILE
c)
FOR and WHILE
d)
IF and ELSE
3.
Which of the following symbols is used in Python to mean "Equal to"?
a)
=
b)
!=
c)
==
d)
>=
4.
Which of the following symbols is used in Python to mean "Not equal to"?
a)
==
b)
!=
c)
<>
d)
><
5.
a)
5
4
3
2
1
b)
4
3
2
1
0
c)
5  4  3  2  1
d)
4  3  2  1  0
6.
a)
5
4
3
2
1
b)
4
3
2
1
0
c)
5  4  3  2  1
d)
4  3  2  1  0
7.
a)
Hello world!
b)
Hello world
c)
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
......(repeated continuously)
d)
Error
8.
a)
Hello world!
b)
Error
c)
Hello world!
False
d)
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
(repeated continuously)
9.
a)
Welcome
b)
Try again!
c)
Error
d)
Enter your password
10.

What is a Count-Controlled loop?

a)

for loop

b)

while loop

11.

A count controlled loop will..

a)

Repeat code until a condition is met

b)

Repeat code a specific amount of times

c)

Repeat code a random amount of times

d)

None of the above

12.

What will this code do?

a)

Print Numbers 1-11

b)

Print Numbers 1-10

c)

Print Numbers 2-10

d)

Print Error

13.

What will be the output of this code?

a)

1,2,3,4,5,6,7,8,9,10,11,12

b)

0,2,4,6,8,10

c)

2,4,6,8,10,12

d)

2,4,6,8,10

14.

What does the '#' allow you to do?

a)

Repeat code

b)

Comment on code

c)

Print code

d)

End code

15.

Which of these will allow me to count from 0-20 in steps of 5?

a)

for x in range(0,20):

print(x)

b)

while x = (0,20,5):

print(x)

c)

for x in range(0,21,5):

print(x)

d)

for x in range(0,21,5):

print(y)

16.

Which type of data will be stored?

a)

String

b)

Integer

c)

Float

d)

Boolean

17.

Which type of data will be stored?

a)

String

b)

Integer

c)

Float

d)

Boolean

18.

From the line of code below match each keyword to its programming defintion

pin = int(input("Please enter the pin number")

=

variable name

pin

assignment

"Please enter the pin number"

declared data type

int

prompt seen on screen

19.

Match the following programming constructs to the example piece of code

print ("I ")

print ("Will ")

print ("Pass!")

Sequence

number = 10

for X in range (number):

print (X*number

Selection

balance = 0

if balance >5:

print ("you can make this purchase")

else:

print (" insufficient funds")

Condition based

Iteration

target = int(input())

while target <50:

print ("You will need to increase the target score")

Count based Iteration

20.

What type of storage is a DVD ROM?

a)

Optical

b)

Magnetic

c)

Solid State

d)

It is not a storage device

21.

Which of the following is not a type of storage

a)

Optical

b)

Magnetic

c)

Solid State

d)

Hard Drive

22.

What type of storage is a USB memory stick?

a)

Optical

b)

Magnetic

c)

Solid State

d)

It is not a storage device

23.

What type of storage is a HDD?

a)

Optical

b)

Magnetic

c)

Solid State

d)

It is not a storage device

24.

What is a flowchart?

a)

A visual representation of an algorithm.

b)

A diagram that shows abstraction.

c)

A series of shapes.

25.

Define DECOMPOSITION

a)

Breaking a task into smaller tasks.

b)

Looking for similarities and trends.

c)

A sequence of instructions.

d)

Focusing on what is important and ignoring what is unnecessary.

26.

Which flowchart shape is this?

a)

Decision

b)

Input / Output

c)

Process

d)

Terminator

27.

Which flowchart shape is this?

a)

Decision

b)

Input / Output

c)

Process

d)

Terminator

28.

Which flowchart shape is this?

a)

Decision

b)

Input / Output

c)

Process

d)

Terminator

29.

Which flowchart shape is this?

a)

Decision

b)

Input / Output

c)

Process

d)

Terminator

30.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
31.
Identify a variable within this flowchart.
a)
INPUT
b)
Start
c)
12
d)
RESULT
32.

What does sequence mean?

a)

To create a pattern

b)

To do something in order

c)

To do something randomly

d)

To repeat something over and over again