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

WGU C949 - Data Structures And Algorithms exam with 100% correct answers 2024

Rating
-
Sold
-
Pages
19
Grade
A+
Uploaded on
08-02-2024
Written in
2023/2024

WGU C949 - Data Structures And Algorithms exam with 100% correct answers 2024 A program can modify the elements of an existing list. True or False - answerTrue The size of a list is determined when the list is created and can not change. True or False - answerFalse All elements of a list must have the same type. True or False - answerFalse The statement del my_list[2] produces a new list without the element in position 2. True or False. - answerFalse The statement my_list1 + my_list2 produces a new list. True or False - answerTrue Assume that my_list is [0, 5, 10, 15]. What value is returned by sum(my_list)? - answer30 Assume that my_list is [0, 5, 10, 15]. What value is returned by max(my_list)? - answer15 Assume that my_list is [0, 5, 10, 15]. What value is returned by any(my_list)? - answerTrue Assume that my_list is [0, 5, 10, 15]. What value is returned by all(my_list)? - answerFalse Assume that my_list is [0, 5, 10, 15]. What value is returned by min(my_list)? - answer0 Given the list nums = [[10, 20, 30], [98, 99]], what does nums[0][0] evaluate to? - answer10 Given the list nums = [[10, 20, 30], [98, 99]], what does nums[1][1] evaluate to? - answer99 Given the list nums = [[10, 20, 30], [98, 99]], what does nums[0] evaluate to? - answer[10,20,30] Create a nested list nums whose only element is the list [21, 22, 23]. - answernums = [[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. - answerscores[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)). - answer3 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]? - answer[1,2,3,5] nums = [1,1,2,3,5,8,13]. What is the result of nums[5:10]? - answer[8,13] nums = [1,1,2,3,5,8,13]. What is the result of nums [3:-1]? - answer[3,5,8 Given the following code: nums = [0,25,50,75,100]: The result of evaluating nums[0:5:2] is [25, 75]. - answerFalse [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]. - answerTrue. 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]? - answer10 Iterating over a list and deleting elements from the original list might cause a logical program error. - answerTrue A programmer can iterate over a copy of a list to safely make changes to that list. - answerTrue Twice the value of each element in the list variable x. - answer[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. - answer[abs(i) for i in x

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
February 8, 2024
Number of pages
19
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

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.
Brainbarter Kaplan University
View profile
Follow You need to be logged in order to follow users or courses
Sold
323
Member since
2 year
Number of followers
153
Documents
22254
Last sold
5 hours ago
A+ STUDY MATERIALS.

We offer a wide range of high-quality study materials, including study guides practice exams and flashcards. WELCOME.

3.5

54 reviews

5
21
4
8
3
12
2
4
1
9

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