wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PLTW CSE 3.1- 3.2

Total questions: 50

Worksheet time: 29mins

Name
Class
Date
1.
To repeat a fixed number of times use a
a)
while loop
b)
for loop
c)
if loop
d)
indentation
2.
To repeat until a particular condition is true use
a)
while loop
b)
for loop
c)
if loop
d)
indentation
3.
Data type that can only be true or false
a)
int
b)
string
c)
bool
d)
float
4.
Tells the interpreter that the code which follows is a function
a)
const
b)
int
c)
def
d)
while
5.
What does the print function do in python?
a)
It's a variable.
b)
It can input data.
c)
It displays something like a string or integer
d)
It loops the code.
6.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
7.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
8.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language
9.
Which of these would work as a piece of code?
a)
IF answer == "Yes":
b)
if answer == "Yes"
c)
if answer == "Yes":
d)
if answer = "yes":
10.

people = ["John", "Rob", "Bob"]

print (people[4])

what would this result be?

a)
John
b)
Rob
c)
Bob
d)
Error
11.
What will be the output?
name = 'Dave'
print (name)
a)
Dave
b)
'Dave'
c)
name
d)
(name)
12.
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
a)
Good moning 'Dave'
b)
Good morning Dave
c)
Good morning name
d)
Good morning + Dave
13.
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:
14.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
15.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
16.
What will the output be from the following code?
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
17.
Which Python command is used to output information to the screen?
a)
read
b)
output
c)
print
d)
display
18.
What is syntax?
a)
Syntax is the word used to describe an error
b)
Syntax is the rules of the programming language
c)
It is used to read information
d)
It is used to output information 
19.
What symbol is used in python to assign values to a variable?
a)
equals =
b)
plus + 
c)
forward slash /
d)
asterisk *
20.
What would print (10 + 16) produce?
a)
20
b)
22
c)
24
d)
26
21.
How do you display text?
a)
input
b)
output
c)
print
d)
variable 
22.
What would amount equal in this piece of code:

amount = 2 + 5 * 2
a)
12
b)
9
c)
14
d)
5
23.
How many times does the following program print the word ‘computer’:

word= "computer"  
for num in range(1,6):
 
    print(word)
a)
5
b)
6
c)
1
d)
0
24.

What numbers are included in this range call: range(2, 10, 2)

a)

2, 4, 6, 8, 10

b)

2, 4, 6, 8

c)

1, 2, 3, 4, 5, 6, 7, 8, 9

d)

2, 3, 4, 5, 6, 7, 8, 9

25.
A(n) abstraction is:
a)
Way to manage complexity, hide details or remove duplication
b)
Type of code to perform a math operation, such as + - * /
c)
Values that a program provides to a function or subroutine
d)
A set of steps to accomplish a task.
26.

A sequence of actions or instructions to follow in solving a problem or accomplishing a task is known as?

a)

Event

b)

Block Based Programming

c)

Procedure

d)

Code

27.

A function of an application or user interface is known as?

a)

Abstraction

b)

Feature

c)

Debugging

d)

Itiration

28.

A process of repeating a set of instructions a specified number of times or until a condition is met is known as?

a)

Abstraction

b)

Feature

c)

Debugging

d)

Itiration

29.

A means to create computer programs by manipulating elements graphically rather than using text is known as?

a)

Python

b)

Block Based Programming

c)

Code

d)

Abstraction

30.

algorithm

a)

You create the user interface

b)

identify errors in programs and fix them

c)

a set of step to accomplish a task

d)

smallest unit of data storage that a program can use

31.

variable

a)

You create the user interface

b)

identify errors in programs and fix them

c)

a set of step to accomplish a task

d)

smallest unit of data storage that a program can use

32.

debugging

a)

You create the user interface

b)

identify errors in programs and fix them

c)

a set of step to accomplish a task

d)

smallest unit of data storage that a program can use

33.

component

a)

a function in an app that you can add in the Designer View

b)

you program the features you added in the Designer View.

c)

an algorithm using symbols in decision making like TRUE/FALSE, YES/NO

d)

a value passed to a storage location to be used by the program

34.

The science of creating artifacts and solving problems using the power of a computer.

a)

user-centered

b)

code

c)

input

d)

computer science

35.

Information or signals entered into a computer system (ex: buttons or touch screens).

a)

user-centered

b)

computer science

c)

input

d)

code

36.

A set of program instructions

a)

abstraction

b)

code

c)

user-centered

d)

iteration

37.

A(n) arithmetic operator is:

a)

Values that a program provides to a function or subroutine

b)

Type of code to perform a math operation, such as + - * /

c)

A set of steps to accomplish a task.

d)

Way to manage complexity, hide details or remove duplication

38.

A(n) string is:

a)

An object such as a number or word. A _____ is an expression that cannot be evaluated any further. Variables are evaluated to a final ____ before operators (arithmetic, relational, or logical) are then used on them.

b)

An action (such as clicking a button) or occurrence (receiving a text message) that happens during runtime that will trigger a response or behavior by the software.

c)

The smallest unit of data storage that a program can use.

d)

A type of variable that holds text (characters, numbers, punctuation or math symbols). Uses quotes to tell the computer to not treat what is inside the string (inside the quotes) as code.

39.

A software application, especially one that a user downloads to a mobile device.

a)

app

b)

append

c)

API

d)

argument

40.

A structured collaborative process in which two people create code together, each with a specific role. The "driver" types at the keyboard and the "navigator" directs the code creation based on the requirements of the development.

a)

pair programming

b)

output

c)

parameter

d)

operating system

41.

True or False: You should be careful when an app that you are downloading ask for personal information?

a)

True

b)

False

42.

An example of an output function would be?

a)

Mouse

b)

Keyboard

c)

Printer

d)

Touch screen

43.

Which below is an example of Computer Science in our lives?

a)

Programable Thermostats

b)

Ring Door bell with Camera

c)

A person with an insulin monitor

d)

All of the above

44.
A(n) float is:
a)
A precise number by including values after the decimal place
b)
A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)
c)
A data type that can have only 2 values - TRUE or FALSE
d)
A whole number, it does not have any digits after a decimal.
45.

A(n) integer is:

a)

A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)

b)

A precise number by including values after the decimal place

c)

A whole number, it does not have any digits after a decimal.

d)

A data type that can have only 2 values - TRUE or FALSE

46.

A(n) value is:

a)

A type of variable that holds text (characters, numbers, punctuation or math symbols). Uses quotes to tell the computer to not treat what is inside the string (inside the quotes) as code.

b)

An object such as a number or word. A _____ is an expression that cannot be evaluated any further. Variables are evaluated to a final ____ before operators (arithmetic, relational, or logical) are then used on them.

c)

An action (such as clicking a button) or occurrence (receiving a text message) that happens during runtime that will trigger a response or behavior by the software.

d)

The smallest unit of data storage that a program can use.

47.

What does Modulo do

a)

Gives the difference of two numbers

b)

Does simple arithmetic

c)

Give the product when mutiplying

d)

Returns the reminder when divding

48.
Python identifies blocks of code by
a)
BEGIN and END keywords
b)
{ and }
c)
aligning up the starts of lines (indentation)
d)
guessing
49.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
50.
Python is an example of a....
a)
Text-based programming language
b)
Object orientated programming language
c)
language written in java script
d)
Visual-based programming language