NEW
Font size
WorksheetsPage 1
Total questions: 10
Worksheet time: 5mins
Which statement best describes data abstraction in programming?
It stores files in folders for easy access
It encrypts variables to protect data
It hides details by naming a whole dataset
It makes code run faster automatically
What is the main difference between a list and a tuple in Python?
Lists can change, tuples cannot change
Tuples are longer than lists by default
Lists start at index one by design
Tuples store only numbers, not strings
Which definition of index is correct for sequences like lists?
Numbers match the item’s actual value
Positions start at one and skip even numbers
Positions start at zero and increase by one
Labels are random and assigned by the OS
Which keyword checks if a value appears in a list, tuple, or string?
get
find
has
in
A value that does not change while a program runs is called what?
Fixed index
Static list
Locked tuple
Immutable
Which statement about unsorted data is accurate?
Items are grouped by even and odd
Items are always increasing by value
Items have no particular arranged order
Items follow alphabetical arrangement
Which search algorithm divides a sorted list into smaller parts to locate a target?
Grid search
Hash search
Sequential search
Binary search
Sequential search is best described as what process?
Checking each item one by one
Jumping to the middle and halving
Sorting before every comparison
Comparing only indexes, not values
You have a sorted list of 100 numbers. Which search should you use for fastest average performance?
Random probing
Binary search
Sequential search
Index-only scan
You need to test whether the word "cat" appears anywhere in the string "The catalog is new". Which simple Python check works?
"cat" in "The catalog is new"
has("cat", "The catalog is new")
get("cat", "The catalog is new")
find("cat", "The catalog is new") == True
