100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH 100% CORRECT ANSWERS L LATEST VERSION 2025/2026.

Rating
-
Sold
-
Pages
25
Grade
A+
Uploaded on
25-11-2025
Written in
2025/2026

DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH 100% CORRECT ANSWERS L LATEST VERSION 2025/2026.

Institution
DATA STRUCTURES AND ALGORITHMS
Course
DATA STRUCTURES AND ALGORITHMS










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
DATA STRUCTURES AND ALGORITHMS
Course
DATA STRUCTURES AND ALGORITHMS

Document information

Uploaded on
November 25, 2025
Number of pages
25
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

DATA STRUCTURES AND ALGORITHMS
EXAM QUESTIONS WITH 100%
CORRECT ANSWERS L LATEST
VERSION 2025/2026.




A program can modify the elements of an existing list. True or False - ANS True


The size of a list is determined when the list is created and can not change. True or False -
ANS False


All elements of a list must have the same type. True or False - ANS False


The statement del my_list[2] produces a new list without the element in position 2. True or
False. - ANS False


The statement my_list1 + my_list2 produces a new list. True or False - ANS True


Assume that my_list is [0, 5, 10, 15]. What value is returned by sum(my_list)? - ANS 30


Assume that my_list is [0, 5, 10, 15]. What value is returned by max(my_list)? - ANS 15


Assume that my_list is [0, 5, 10, 15]. What value is returned by any(my_list)? - ANS True


1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

,Assume that my_list is [0, 5, 10, 15]. What value is returned by all(my_list)? - ANS False


Assume that my_list is [0, 5, 10, 15]. What value is returned by min(my_list)? - ANS 0


Given the list nums = [[10, 20, 30], [98, 99]], what does nums[0][0] evaluate to? - ANS 10


Given the list nums = [[10, 20, 30], [98, 99]], what does nums[1][1] evaluate to? - ANS 99


Given the list nums = [[10, 20, 30], [98, 99]], what does nums[0] evaluate to? -
ANS [10,20,30]


Create a nested list nums whose only element is the list [21, 22, 23]. - ANS nums =
[[21,22,23]]


1) Assume the following list has been created:
scores = [[75,100,82,76], [85,98,89,99], [75,82,85,5]]
Write an indexing expression that gets the element from scores whose value is 100. -
ANS scores[0][1]


scores = [[75,100,82,76], [85,98,89,99], [75,82,85,5]]

How many elements does scores contain? (The result of len(scores)). - ANS 3 that are lists.


Assume that the following code has been evaluated: nums = [1,1,2,3,5,8,13]. What is the result
of nums[1:5]? - ANS [1,2,3,5]


nums = [1,1,2,3,5,8,13].

What is the result of nums[5:10]? - ANS [8,13]




2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

, nums = [1,1,2,3,5,8,13].

What is the result of nums [3:-1]? - ANS [3,5,8


Given the following code: nums = [0,25,50,75,100]:

The result of evaluating nums[0:5:2] is [25, 75]. - ANS False [0,50,100]. Indexs 0 through 5
stepping 2.


nums = [0,25,50,75,100]

The result of evaluating nums[0:-1:3] is [0, 75]. - ANS True. Index 0 going backwards stepping
3.


Consider the following program:
nums = [10, 20, 30, 40, 50]


for pos, value in enumerate(nums):
tmp = value / 2
if (tmp % 2) == 0:
nums[pos] = tmp

What's the final value of nums[1]? - ANS 10


Iterating over a list and deleting elements from the original list might cause a logical program
error. - ANS True


A programmer can iterate over a copy of a list to safely make changes to that list. - ANS True


Twice the value of each element in the list variable x. - ANS [i*2 for i in x]


The absolute value of each element in x. Use the abs() function to find the absolute value of a
number. - ANS [abs(i) for i in x]


3 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Brightstars Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
193
Member since
1 year
Number of followers
7
Documents
12191
Last sold
5 days ago
VERIFIED EXAMS AND STUDY GUIDES.

Here, you will find Study Notes, Exam answer packs 100% Guarenteed success.

3.3

31 reviews

5
10
4
4
3
8
2
3
1
6

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions