NEW
Font size
WorksheetsPython lists
Total questions: 7
Worksheet time: 5mins
What is the printed?
grades=[ ]
grades.append(45)
grades.append(67)
grades.append(35)
grades.append(21)
print(grades)
[45, 67, 35, 21 ]
[35, 67, 45, 21]
[ ]
Nothing
What does Append do in python?
Add (something) as an attachment or supplement.
Append is to join or add on to the end of something.
Attach
Take away a number.
What is printed?
list=[1, 2, 3, 4]
length=(len(list))
print(length)
4
3
2
1
What does the reverse function do in python?
Nothing
Reverses the list
Move Backwards
Going in or turned toward the direction opposite to that previously stated.
What is the printed?
grades=[21, 35, 67, 45, 99, 51]
grades.sort()
print(grades)
[21, 35, 67, 45, 99, 51]
[21, 35, 45, 51, 67, 99]
[21, 35, 45, 67, 51, 99]
Nothing
What is the printed?
grades=[21, 35, 67, 45, 99, 51]
grades.remove(67)
print(grades)
[21, 35, 45, 99, 51]
[21, 35, 45, 67, 99]
[67, 35, 51, 45, 99]
Nothing
What does the slice do in python?
A thin, broad piece of food, such as bread, meat, or cake, cut from a larger portion.
A stroke that makes the ball curve away to the right (for a left-handed player, the left), typically inadvertently.
Cut a Cucumber
Extracts elements, based on a start and stop.
