Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONS

Beoordeling
-
Verkocht
-
Pagina's
9
Cijfer
A+
Geüpload op
19-05-2025
Geschreven in
2024/2025

CMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONSCMPSC 9 MIDTERM 2025 ACTUAL EXAM QUESTIONS

Meer zien Lees minder
Instelling
CMPSC 9 2025
Vak
CMPSC 9 2025

Voorbeeld van de inhoud

CMPSC 9 MIDTERM 2025 ACTUAL
EXAM QUESTIONS
Even though methods are similar to functions, briefly state what makes a method
different than a function - CORRECT ANSWER>>>>methods are associated with
an object as they call on an object

What is the purpose of the class' constructor? - CORRECT ANSWER>>>>to
define the way in which objects are created

What is the name of the constructor method when defining it in a class -
CORRECT ANSWER>>>>__init__

What do we need to do in order to create an instance of a class? - CORRECT
ANSWER>>>>use the name of the class and pass actual values for the necessary
state to create an object

What is the purpose of the self parameter? - CORRECT ANSWER>>>>to
represent the object you are intending to call the method on

What is the method name to convert an object to a string? - CORRECT
ANSWER>>>>__str__

What is == comparing? - CORRECT ANSWER>>>>if two objects are the same;
will only return true if the two objects are the same object

What does deep equality mean? - CORRECT ANSWER>>>>values are compared
rather than the memory addresses

What does shallow equality mean? - CORRECT ANSWER>>>>memory
addresses are used to compare objects

What are four characteristics a list inherits from its direct parent - CORRECT
ANSWER>>>>ordering of the underlying data, concatenation, repetition, and
indexing

What makes a Binary Gate differ from a Unary Gate type - CORRECT
ANSWER>>>>binary gate's have two lines of input while unary gate's have one
line of input

, two computing resources considered when doing analysis of an algorithm -
CORRECT ANSWER>>>>time and memory

what is the problem of using the computer to time various algorithms - CORRECT
ANSWER>>>>sometimes the performance of an algorithm depends on the exact
values of the data instead of problem size, so performance is characterized by best,
average, or worst case

State the relationship between O(n) and T(n) - CORRECT ANSWER>>>>O(n) is
the part of T(n) that increases the fastest as the value of n increases

What is happening when removing an element from the front of a list? -
CORRECT ANSWER>>>>all the other elements are shifted in the list on position
closer to the beginning of the list

what are the three laws of recursion - CORRECT ANSWER>>>>1. must have a
base case 2. must change its state and move toward the base case 3. must call itself,
recursively

mutable - CORRECT ANSWER>>>>lists, dictionaries

immutable - CORRECT ANSWER>>>>strings, tuples, integers

dictionaries - CORRECT ANSWER>>>>has a unique key that maps to a value;
keys must be immutable while values can be any type

methods - CORRECT ANSWER>>>>like functions but associated with an object

syntax error - CORRECT ANSWER>>>>error in a program that makes it
impossible to parse and therefore impossible to interpret

runtime error - CORRECT ANSWER>>>>error that does not occur until the
program has started to execute by that prevents the program from continuing

try/except order - CORRECT ANSWER>>>>except statements are checked top-
down and the first matching exception type block is executed

Test Driven Development (TDD) - CORRECT ANSWER>>>>1. write tests that
describe what the intended behavior of a unit of software should do 2. implement

Geschreven voor

Instelling
CMPSC 9 2025
Vak
CMPSC 9 2025

Documentinformatie

Geüpload op
19 mei 2025
Aantal pagina's
9
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$24.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
profwhite Harvard University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
115
Lid sinds
3 jaar
Aantal volgers
76
Documenten
3530
Laatst verkocht
4 maanden geleden

4.3

19 beoordelingen

5
13
4
2
3
2
2
0
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen