Font size
WorksheetsJ277 Random Quiz 1
Total questions: 32
Worksheet time: 15mins
4
3
2
1
3
2
1
0
4
3
2
1
3
2
1
0
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
......(repeated continuously)
False
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
(repeated continuously)
What is a Count-Controlled loop?
for loop
while loop
A count controlled loop will..
Repeat code until a condition is met
Repeat code a specific amount of times
Repeat code a random amount of times
None of the above
What will this code do?
Print Numbers 1-11
Print Numbers 1-10
Print Numbers 2-10
Print Error
What will be the output of this code?
1,2,3,4,5,6,7,8,9,10,11,12
0,2,4,6,8,10
2,4,6,8,10,12
2,4,6,8,10
What does the '#' allow you to do?
Repeat code
Comment on code
Print code
End code
Which of these will allow me to count from 0-20 in steps of 5?
for x in range(0,20):
print(x)
while x = (0,20,5):
print(x)
for x in range(0,21,5):
print(x)
for x in range(0,21,5):
print(y)
Which type of data will be stored?
String
Integer
Float
Boolean
Which type of data will be stored?
String
Integer
Float
Boolean
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
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
What type of storage is a DVD ROM?
Optical
Magnetic
Solid State
It is not a storage device
Which of the following is not a type of storage
Optical
Magnetic
Solid State
Hard Drive
What type of storage is a USB memory stick?
Optical
Magnetic
Solid State
It is not a storage device
What type of storage is a HDD?
Optical
Magnetic
Solid State
It is not a storage device
What is a flowchart?
A visual representation of an algorithm.
A diagram that shows abstraction.
A series of shapes.
Define DECOMPOSITION
Breaking a task into smaller tasks.
Looking for similarities and trends.
A sequence of instructions.
Focusing on what is important and ignoring what is unnecessary.
Which flowchart shape is this?
Decision
Input / Output
Process
Terminator
Which flowchart shape is this?
Decision
Input / Output
Process
Terminator
Which flowchart shape is this?
Decision
Input / Output
Process
Terminator
Which flowchart shape is this?
Decision
Input / Output
Process
Terminator
19
What does sequence mean?
To create a pattern
To do something in order
To do something randomly
To repeat something over and over again
