Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

2.1.1 CSE Transitioning from Block to Text Coding

Total questions: 33

Worksheet time: 17mins

Name
Class
Date
1.

Programmers are experts in all programming languages.

a)

true

b)

false

2.

What languages should programmers become experts in?

a)

C, C#

b)

Python and Java

c)

They need to experts at solving problems, being creative, and working in teams

d)

Python and C

3.

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

a)

variable

b)

String

c)

loop

d)

operator

4.

A sequence of characters, either as a literal constant or as some kind of variable

a)

variable

b)

String

c)

operator

d)

integer

5.

A sequence of instructions that is continually repeated until a certain condition is reached

a)

variable

b)

String

c)

integer

d)

loop

6.

A character that represents an action, as for example x is an arithmetic character that represents multiplication

a)

String

b)

loop

c)

operator

d)

integer

7.

A whole number; a number that is not a fraction.

a)

operator

b)

loop

c)

String

d)

integer

8.

What do single quotes ' ' represent in Python?

a)

loop

b)

function

c)

a string literal

d)

variable

9.

How is the code inside a loop represented in Python?

a)

' ' (single quotes)

b)

arithmetic operators

c)

=

d)

indent

10.

How does a value get assigned to a variable?

a)

' ' (single quotes)

b)

= = (two equals signs)

c)

= (equals sign)

d)

an indent

11.

In Python, this begins with the keyword “def” followed by the function name and parentheses

a)

procedure

b)

function

c)

def

d)

parameter

12.

Reduced in number by one

a)

loop

b)

increment

c)

argument

d)

decrement

13.

What does " " " (three consecutive double quotes) represent in Python?

a)

multiline comments

b)

loop

c)

single line comments

d)

procedure

14.

What does the # (hashtag symbol) represent in Python?

a)

multiline comment

b)

function

c)

single line comment

d)

parameter

15.

These are necessary in a program to help others understand your code and update it when needed.

a)

procedures

b)

functions

c)

comments or documentation

d)

imports

16.

The letter i is used in programming for loops. It stands for what?

a)

index or decrementing

b)

index or incrementing

c)

It does not stand for anything

d)

integer or index

17.

A software application that brings together the tools necessary to write, test, and debug computer programs while they are developed.

a)

App Inventor

b)

Python

c)

IDE

d)

Vex Coding Studio

18.

What is the difference in procedures and functions?

a)

One is a while loop and one is a for loop

b)

One is incremented and one is decremented

c)

There is no difference--they do the same thing

d)

One is global and one is loca

19.

A special kind of variable defined in a function to receive specific information.

a)

loop

b)

String

c)

variable

d)

parameter

20.

The values that a program provides to a function or subroutine.

a)

argument

b)

loop

c)

parameter

d)

String

21.

What does NAN stand for?

a)

it is a compile error

b)

it is a procedure call

c)

it defines variables

d)

not a number--a number was expected

22.

What does this code do? text_prompt(msg)

a)

defines a String

b)

calls a function

c)

allows the user to input something

d)

is passing an argument to a function

23.

name = 'code'

print(len(name))

What does this code return?

a)

name

b)

4

c)

3

d)

nothing

24.

What does this code return?

name = 'code'

print(name)

a)

error

b)

name

c)

4

d)

code

25.

A programming statement that evaluates a true/false Boolean expression to determine the next steps in a program

a)

loop

b)

conditional statement

c)

print statement

d)

function

26.

In programming, a named section of a program that performs a specific task.

a)

function

b)

import

c)

loop

d)

print statement

27.

Why are import statements put at the top of programs?

a)

It is not necessary to put imports at the top of the program

b)

To keep them away from the Python code

c)

So they can be used throughout the program

d)

Import statements go at the bottom of a program

28.

What do the values in the ( ) represent after the random function is called?

a)

The values in the () represent the variables used in the program

b)

The values in the ( ) represent the smallest number and the largest number that could be randomly selected.

c)

The values in the ( ) represent the function that is being coded

d)

The values represented in the ( ) determine how many times the loop will execute.

29.

A description of a program that can change based on inputs and conditions in the program.

a)

dynamic

b)

import

c)

text based programming

d)

parameter

30.

What type of variable is this?


name = 'code'

a)

boolean

b)

float

c)

int

d)

String

31.

What type of variable is this?


isOpen = true

a)

int

b)

float

c)

String

d)

boolean

32.

What type of variable is this?


grade = 80.0

a)

String

b)

num

c)

float

d)

int

33.

What type of variable is this?


room = 312

a)

int

b)

float

c)

String

d)

num