Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CS 3320 Final Exam Questions and Already Solved Answers.

Document preview thumbnail
Preview 2 out of 6 pages

What is the value of the variable phones after the following code executes? phones={'John' : '5555555', 'Julie': '5557777'} phones [John'} =5556666' - Answer This code is invalid In a dictionary, you can use a____ to locate a specific value - Answer key The issubset( ) method can be used to determine whether set1 is a subset of set2 - Answer True The union of two sets is a set that contains only the elements that appear in both sets - Answer False The elements in a dictionary are stored in ascending order, by the keys of the key-value pairs. - Answer False If you try to retrieve a value from a dictionary using a nonexistent key, a KeyError exception is raised - Answer True Sets are Immutable - Answer False The difference of set1 and set2 is a set that contains only the elements that appear in set1 but do not appear in set2. - Answer True

Content preview

CS 3320 Final Exam Questions and
Already Solved Answers.
What is the value of the variable phones after the following code executes?

phones={'John' : '5555555', 'Julie': '5557777'}

phones [John'} =5556666' - Answer This code is invalid



In a dictionary, you can use a____ to locate a specific value - Answer key



The issubset( ) method can be used to determine whether set1 is a subset of set2 - Answer
True



The union of two sets is a set that contains only the elements that appear in both sets - Answer
False



The elements in a dictionary are stored in ascending order, by the keys of the key-value pairs. -
Answer False



If you try to retrieve a value from a dictionary using a nonexistent key, a KeyError exception is
raised - Answer True



Sets are Immutable - Answer False



The difference of set1 and set2 is a set that contains only the elements that appear in set1 but
do not appear in set2. - Answer True



Sets are created using curly braces { }. - Answer False



You would typically use a for loop to iterate over the elements in a set. - Answer True



A dictionary can include the same value several times but cannot include the same key several
times. - Answer True

, What is the number of the first index in a dictionary? - Answer Dictionaries are not indexed by
number.



What will the result of the following code?

ages={'Aaron' : 6, 'Kelly' : 3, 'Abigail' :1}

value=ages['Briana'] - Answer KeyError



An object is a stand-alone program but is used by programs that need its service. - Answer
False



Which section in the UML holds the list of the class's methods? - Answer third section



The self parameter need not to be named self but it is strongly recommended to do so, to
conform with standard practice. - Answer True



What does the acronym UML stand for? - Answer Unified Modeling Language



The procedures that an object performs are called? - Answer methods



In a UML diagram the first section holds the list of the class's methods. - Answer False



Procedures operate on data items that are separate from the procedures. - Answer True



All instances of a class share the same values of the data attributes in the class. - Answer False



What type of method provides a safe way to code outside a class to retrieve the values of
attributes, without exposing the attributes in a way that could allow them to be changed by
code outside the method? - Answer accessor



A mutator method has no control over the way that a class's data attributes are modified -
Answer False



Which section in the UML hold the list of the class data attributes - Answer second section

Document information

Uploaded on
September 20, 2025
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
TestSolver9
3.5
(168)
Sold
962
Followers
128
Items
30913
Last sold
3 hours ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions