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

WGU C949 Algorithms & Data Structures Frequently Tested Exam Questions With Verified Multiple Choice and Conceptual Actual 100% Correct Detailed Answers Guaranteed Pass!!Current Update!!

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

WGU C949 Algorithms & Data Structures Frequently Tested Exam Questions With Verified Multiple Choice and Conceptual Actual 100% Correct Detailed Answers Guaranteed Pass!!Current Update!! 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. - ANSWER scores[0][1] 2. scores = [[75,100,82,76], [85,98,89,99], [75,82,85,5]] How many elements does scores contain? (The result of len(scores)). - ANSWER 3 that are lists. 3. Assume that the following code has been evaluated: nums = [1,1,2,3,5,8,13]. What is the result of nums[1:5]? - ANSWER [1,2,3,5] nums = [1,1,2,3,5,8,13]. 4. What is the result of nums[5:10]? - ANSWER nums = [1,1,2,3,5,8,13]. 5. What is the result of nums [3:-1]? - ANSWER [8,13] [3,5,8 Given the following code: nums = [0,25,50,75,100]:

Show more Read less
Institution
WGU C949
Course
WGU C949











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

Written for

Institution
WGU C949
Course
WGU C949

Document information

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

Subjects

Content preview

WGU C949 Algorithms & Data Structures
Frequently Tested Exam Questions With
Verified Multiple Choice and Conceptual
Actual 100% Correct Detailed Answers

Guaranteed Pass!!Current Update!!


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. - ANSWER scores[0][1]


2. scores = [[75,100,82,76], [85,98,89,99], [75,82,85,5]]
How many elements does scores contain? (The result of len(scores)). - ANSWER
3 that are lists.


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


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

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


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

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

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

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


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

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


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


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

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


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


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

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


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


14. The largest square root of any element in x. Use math.sqrt() to calculate the
square root. - ANSWER max([math.sqrt(i) for i in x])


15. Write a list comprehension that contains elements with the desired values.
Use the name 'i' as the loop variable. Use parentheses around the expression or
condition as necessary.

Only negative values from the list x: - ANSWER [i for i in x if i < 0]



16. Only negative odd values from the list x. - ANSWER [(i) for i in x if ((i < 0)
and (i % 2 == 1))]


17. Dictionary entries can be modified in-place - a new dictionary does not need
to be created every time an element is added, changed, or removed. True or False
- ANSWER True


18. The variable my_dict created with the following code contains two keys, 'Bob'
and 'A+'. my_dict = dict(name='Bob', grade='A+'). True or False - ANSWER
False

, Determine the output of each code segment. If the code produces an error, type
None. Assume that my_dict has the following entries:


my_dict = dict(bananas=1.59, fries=2.39, burger=3.50, sandwich=2.99).
my_dict.update(dict(soda=1.49, burger=3.69))
burger_price = my_dict.get('burger', 0)



print(burger_price) - ANSWER Output: 3.69


19. Determine the output of each code segment. If the code produces an error,
type None. Assume that my_dict has the following entries:


my_dict = dict(bananas=1.59, fries=2.39, burger=3.50, sandwich=2.99)
my_dict['burger'] = my_dict['sandwich']
val = my_dict.pop('sandwich')



print(my_dict['burger']) - ANSWER Output: 2.99



Print each key in the dictionary my_dict. - ANSWER for key in my_dict

print(key)



Change all negative values in my_dict to 0. - ANSWER for key, value in
my_dict.items()
if value < 0:

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.
NURSINGDICTIONARY Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
238
Member since
2 year
Number of followers
87
Documents
2495
Last sold
1 day ago
NURSING ENCYCLOPEDIA

Our mission is to bring students and learners together and help you to get through your studies, courses and exams. Providing Well Revised Expert Information.

4.1

27 reviews

5
14
4
5
3
6
2
1
1
1

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