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