PLTW Computer Science Final Exam
Review (multiple choice)
How are variables used in programming? - Answer-They are used as a storing location associated with an
identifier
What is a variable? - Answer-A named memory cell where information can be stored
A function is a block of code. How many built-in functions does Python have? - Answer-80
Python uses the keyword def to define a new function
a. True b. False - Answer-True
The lines of code in a function are indented four (4) spaces
a. True b. False - Answer-True
To create multi-line comments (also called a docstring) you would use ________. - Answer-'''
To add comments in Python, use the ___________symbol - Answer-#
True or False - Answer-boolean
, text that is not changed or manipulated just used as it is - Answer-string
Integers - Answer-int
Any number with a decimal - Answer-float
To assign a variable to a value you must use the ________ . - Answer-=
To divide numbers you must use the _______________ symbol . - Answer-/
To multipy numbers you must use the _______________ symbol . - Answer-*
To get the exponential of a number you would use the ___________ symbol. - Answer-**
What is the correct way to assign the value of 12 to the variable ounces? - Answer-ounces = 12
In an if-structure, what gets executed depends on whether a Boolean expression, also known as a
conditional is true
a. True b. False - Answer-True
In a Boolean expression, which operator is used to express that 5 is greater than 3 - Answer->
Boolean expressions can also be connected conditionals. Which of the following is not used for
connection expressions?
Review (multiple choice)
How are variables used in programming? - Answer-They are used as a storing location associated with an
identifier
What is a variable? - Answer-A named memory cell where information can be stored
A function is a block of code. How many built-in functions does Python have? - Answer-80
Python uses the keyword def to define a new function
a. True b. False - Answer-True
The lines of code in a function are indented four (4) spaces
a. True b. False - Answer-True
To create multi-line comments (also called a docstring) you would use ________. - Answer-'''
To add comments in Python, use the ___________symbol - Answer-#
True or False - Answer-boolean
, text that is not changed or manipulated just used as it is - Answer-string
Integers - Answer-int
Any number with a decimal - Answer-float
To assign a variable to a value you must use the ________ . - Answer-=
To divide numbers you must use the _______________ symbol . - Answer-/
To multipy numbers you must use the _______________ symbol . - Answer-*
To get the exponential of a number you would use the ___________ symbol. - Answer-**
What is the correct way to assign the value of 12 to the variable ounces? - Answer-ounces = 12
In an if-structure, what gets executed depends on whether a Boolean expression, also known as a
conditional is true
a. True b. False - Answer-True
In a Boolean expression, which operator is used to express that 5 is greater than 3 - Answer->
Boolean expressions can also be connected conditionals. Which of the following is not used for
connection expressions?