WorksheetsPython Functions and Flowcharts
Total questions: 14
Worksheet time: 7mins
Name
Class
Date
1.
How many times will Boo print?
a)
none
b)
4
c)
5
d)
1
2.
Which of the following best describes the order in which these lines are processed in Python?
a)
1,2,3,4
b)
1,2,1,2,1,4
c)
1,2,1,2,1,2,4
d)
1,2,1,2,1,2,1,2,4
3.
What is a flowchart?
a)
A flowchart is a text-based way of designing an algorithm
b)
A flowchart is a specific programming language
c)
A flowchart is a diagram that represents a set of instructions
4.
If we want to create a Python function that will roll dice for us, which of the below answers will run correctly?
a)
def dice roll ():
b)
def diceroll ()
c)
def diceroll ():
d)
def diceroll []:
5.
What will print?
a)
1
2
11
2
11
b)
1
2
21
2
21
c)
1
2
3
11
2
3
11
d)
1
2
3
21
2
3
21
6.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
7.
Which of the following best describes the order in which these lines are processed in Python?
a)
4, 1, 2
b)
4, 2, 1
c)
1, 2, 3, 4
d)
3, 1, 2
8.
Which symbol does a flowchart begin with?
a)
oval
b)
parallelogram
c)
rectangle
d)
diamond
9.
Which of these errors are not found in the above code?
a)
Missing Brackets
b)
Missing Comma
c)
Missing Colon
d)
Incorrect spelling
10.
What will the lines of code print?
a)
A
b)
B C
c)
A B C
d)
A C
11.
What is this symbol used for in a flowchart?
a)
A decision/question
b)
A task to carry out
c)
A subroutine/function
d)
An iteration/loop
12.
What is the purpose of a flowchart?
a)
To plan the program before it is made
b)
Because it is easier
13.
What is the Output if the temperature is:
19
19
a)
Below Freezing
b)
Above Freezing
14.
What does an arrow represent in a flow chart
a)
Decision making
b)
Data Flow
c)
Start
d)
Stop
100 %
