CS 1400 EXAM 3 QUESTIONS WITH VERIFIED ANSWERS
Correct 48
Incorrect 00
1 of 48
Definition
-
*+ for public data
Give this one a try later!
What is the symbol to indicate private data in UML?
What is the parameter self?
What does pygame.key.get_pressed() return?
, What is the output of the following code?
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[1][2])
Don't know?
2 of 48
Definition
num_list[2].append(5)
Give this one a try later!
Fill in the blanks so the program prints: Sky
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[______][ ])
Code to play sound effects must appear in the same area where the screen is
updated.
Complete the code so the output is: [[ ], [ ], [5], [ ]]
num_list = [[ ], [ ], [ ], [ ]]
print(num_list)
, What is the output of the following code?
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[1][2])
Don't know?
3 of 48
Definition
Type of data the variable holds
*float, int, etc.
Give this one a try later!
What is the output of the following
Why can two different objects call code?
the same method and have different
results? result = "I am Groot!".split()
print(result)
In the variable section, what is Why is a getter often necessary even
the meaning of the value or though accessing a value of a
symbol after the colon? variable doesn't change it?
, Don't know?
4 of 48
Term
What module contains the function necessary to add an image to a
program?
Give this one a try later!
image
Methods can use instance variables
stored in the specific object
*load is the method, image is
the module
['I', 'am', 'Groot!"]
It is how an object refers to itself
*by default, split separates where
there are spaces
Don't know?
Correct 48
Incorrect 00
1 of 48
Definition
-
*+ for public data
Give this one a try later!
What is the symbol to indicate private data in UML?
What is the parameter self?
What does pygame.key.get_pressed() return?
, What is the output of the following code?
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[1][2])
Don't know?
2 of 48
Definition
num_list[2].append(5)
Give this one a try later!
Fill in the blanks so the program prints: Sky
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[______][ ])
Code to play sound effects must appear in the same area where the screen is
updated.
Complete the code so the output is: [[ ], [ ], [5], [ ]]
num_list = [[ ], [ ], [ ], [ ]]
print(num_list)
, What is the output of the following code?
color_list = [["Stop", "Strawberry", "Ruby"], ["Frog", "Broccoli", "Leaf"], ["Sky",
"Blueberry", "Ocean"]]
print(color_list[1][2])
Don't know?
3 of 48
Definition
Type of data the variable holds
*float, int, etc.
Give this one a try later!
What is the output of the following
Why can two different objects call code?
the same method and have different
results? result = "I am Groot!".split()
print(result)
In the variable section, what is Why is a getter often necessary even
the meaning of the value or though accessing a value of a
symbol after the colon? variable doesn't change it?
, Don't know?
4 of 48
Term
What module contains the function necessary to add an image to a
program?
Give this one a try later!
image
Methods can use instance variables
stored in the specific object
*load is the method, image is
the module
['I', 'am', 'Groot!"]
It is how an object refers to itself
*by default, split separates where
there are spaces
Don't know?