Worksheets2.1.1 CSE Transitioning from Block to Text Coding
Total questions: 33
Worksheet time: 17mins
Programmers are experts in all programming languages.
true
false
What languages should programmers become experts in?
C, C#
Python and Java
They need to experts at solving problems, being creative, and working in teams
Python and C
The smallest unit of data storage that a program can use.
variable
String
loop
operator
A sequence of characters, either as a literal constant or as some kind of variable
variable
String
operator
integer
A sequence of instructions that is continually repeated until a certain condition is reached
variable
String
integer
loop
A character that represents an action, as for example x is an arithmetic character that represents multiplication
String
loop
operator
integer
A whole number; a number that is not a fraction.
operator
loop
String
integer
What do single quotes ' ' represent in Python?
loop
function
a string literal
variable
How is the code inside a loop represented in Python?
' ' (single quotes)
arithmetic operators
=
indent
How does a value get assigned to a variable?
' ' (single quotes)
= = (two equals signs)
= (equals sign)
an indent
In Python, this begins with the keyword “def” followed by the function name and parentheses
procedure
function
def
parameter
Reduced in number by one
loop
increment
argument
decrement
What does " " " (three consecutive double quotes) represent in Python?
multiline comments
loop
single line comments
procedure
What does the # (hashtag symbol) represent in Python?
multiline comment
function
single line comment
parameter
These are necessary in a program to help others understand your code and update it when needed.
procedures
functions
comments or documentation
imports
The letter i is used in programming for loops. It stands for what?
index or decrementing
index or incrementing
It does not stand for anything
integer or index
A software application that brings together the tools necessary to write, test, and debug computer programs while they are developed.
App Inventor
Python
IDE
Vex Coding Studio
What is the difference in procedures and functions?
One is a while loop and one is a for loop
One is incremented and one is decremented
There is no difference--they do the same thing
One is global and one is loca
A special kind of variable defined in a function to receive specific information.
loop
String
variable
parameter
The values that a program provides to a function or subroutine.
argument
loop
parameter
String
What does NAN stand for?
it is a compile error
it is a procedure call
it defines variables
not a number--a number was expected
What does this code do? text_prompt(msg)
defines a String
calls a function
allows the user to input something
is passing an argument to a function
name = 'code'
print(len(name))
What does this code return?
name
4
3
nothing
What does this code return?
name = 'code'
print(name)
error
name
4
code
A programming statement that evaluates a true/false Boolean expression to determine the next steps in a program
loop
conditional statement
print statement
function
In programming, a named section of a program that performs a specific task.
function
import
loop
print statement
Why are import statements put at the top of programs?
It is not necessary to put imports at the top of the program
To keep them away from the Python code
So they can be used throughout the program
Import statements go at the bottom of a program
What do the values in the ( ) represent after the random function is called?
The values in the () represent the variables used in the program
The values in the ( ) represent the smallest number and the largest number that could be randomly selected.
The values in the ( ) represent the function that is being coded
The values represented in the ( ) determine how many times the loop will execute.
A description of a program that can change based on inputs and conditions in the program.
dynamic
import
text based programming
parameter
What type of variable is this?
name = 'code'
boolean
float
int
String
What type of variable is this?
isOpen = true
int
float
String
boolean
What type of variable is this?
grade = 80.0
String
num
float
int
What type of variable is this?
room = 312
int
float
String
num
