stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Duplicate of Python Programming Test #2 Flashcards | StudBud
Explore
/
Duplicate of Python Programming Test #2
Duplicate of Python Programming Test #2
20 terms
·
StudBud Administration
·
1 play
Programming concepts in Python including lists, dictionaries, tuples, functions and more.
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
A name inside the parenthesis of a function header that can receive a value
parameter
argument
value
value
2
In the following code, what is size?
parameter
function header
function body
argument
3
What will the following code display?
200
Water
Fire
150
4
Areas in your program that are separate from each other are know as
items
scopes
instances
objects
5
A variable that can only be accessed in the scope in which it was created.
Global
Local
Argument
Parameter
6
An immutable sequence of values of any type
tuple
list
dictionary
string
7
What will the following code display?
Coff
off
offm
Cof
8
A value returned by a function
return value
object
argument
parameter
9
To move through a sequence in order
Checking
Slicing
Indexing
Iterating
10
Which of the following is a tuple?
([0, 9, 8], [7, 6, 5])
{"zero":0, "nine":9, "eight":8}
"0, 9, 8, 7, 6, 5"
[(0, 9, 8), (7, 6, 5)]
11
This sequence type stores data in key:value pairs
dictionaries
lists
strings
tuples
12
A single item in a sequence
key
index
element
constant
13
Which of the following variables are in the same scope?
y, z
z, a
w, y
x, y
14
Which of the following is a value that represents nothing?
None
0
Empty
" "
15
The value passed to a function parameter is known as:
argument
return value
shadow
global variable
16
Which of the following will return the value [7, 6, 5, 4, 3]?
range(8, 3, -1)
range(3, 7, 1)
range(7, 2, -1)
range(7, 3, -1)
17
What will the following code display?
Utah South Carolina Ohio Iowa New York
Utah Ohio Iowa
Utah Ohio
South Carolina New York
18
What will the following code display?
3
0
6
1
19
A technique of hiding the details of code from other parts of code
Encapsulation
Abstraction
Inheritance
Shadow
20
The process used to access a specific element in a sequence
Indexing
Iterating
Slicing
Appending