100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
WGU C949 Key Exam Guide Questions and Integral Marking Scheme version 2024/2025 $11.99   Add to cart

Exam (elaborations)

WGU C949 Key Exam Guide Questions and Integral Marking Scheme version 2024/2025

 1 view  0 purchase
  • Course
  • WGU C949 Data Structure and Algorithm
  • Institution
  • WGU C949 Data Structure And Algorithm

WGU C949 Key Exam Guide Questions and Integral Marking Scheme version 2024/2025 Dictionary key characteristic - correct answer They are unique and immutable. Dictionary method - correct answer D1[key]. remove(value) () - correct answer returns a view object that yields (key, value) tuples....

[Show more]

Preview 3 out of 25  pages

  • November 12, 2024
  • 25
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • WGU C949 Data Structure and Algorithm
  • WGU C949 Data Structure and Algorithm
avatar-seller
KieranKent55
WGU C949 Key Exam Guide Questions and
Integral Marking Scheme version 2024/2025

Dictionary key characteristic - correct answer They are
unique and immutable.


Dictionary method - correct answer D1[key]. remove(value)


dict.items() - correct answer returns a view object that yields
(key, value) tuples.


dict.keys() - correct answer returns a view object that yields
dictionary keys.


dict.values() - correct answer returns a view object that
yields dictionary values.


Dict for loop - correct answer A for loop over a dict retrieves
each key in the dict.
ie.. for key in dictionary:


dict operations - correct answer my_dict[key]
Indexing operation - retrieves the value associated with key.
john_grade = my_dict['John']


my_dict[key] = value

,Adds an entry if the entry does not exist, else modifies the
existing entry.
my_dict['John'] = 'B+'


del my_dict[key]
Deletes the key entry from a dict.
del my_dict['John']


key in my_dict
Tests for existence of key in my_dict
if 'John' in my_dict: # ...


dict methods - correct answer my_dict.clear()
Removes all items from the dictionary
my_dict = {'Bob': 1, 'Jane': 42}
my_dict.clear()
print(my_dict)
{}


my_dict.get(key, default)
Reads the value of the key entry from the dict. If the key does not
exist in the dict, then returns default.
my_dict = {'Bob': 1, 'Jane': 42}
print(my_dict.get('Jane', 'N/A'))
print(my_dict.get('Chad', 'N/A'))
42

, N/A


my_dict1.update(my_dict2)
Merges dictionary my_dict with another dictionary my_dict2.
Existing entries in my_dict1 are overwritten if the same keys
exist in my_dict2.
my_dict = {'Bob': 1, 'Jane': 42}
my_dict.update({'John': 50})
print(my_dict)
{'Bob': 1, 'Jane': 42, 'John': 50}


my_dict.pop(key, default)
Removes and returns the key value from the dictionary. If key
does not exist, then default is returned.
my_dict = {'Bob': 1, 'Jane': 42}
val = my_dict.pop('Bob')
print(my_dict)
{'Jane': 42}


Underlying data structures: Binary search tree, Hash table -
correct answer Set, Dictionary(Map)


Underlying data structures: Heap - correct answer Priority
queue


Underlying data structures: Linked list, Array - correct
answer Bag, Queue, List

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller KieranKent55. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

80796 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.99
  • (0)
  Add to cart