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)

DSC10 Winter 2025 Final Exam Questions and Answers University of California

Beoordeling
-
Verkocht
-
Pagina's
27
Cijfer
A+
Geüpload op
20-02-2026
Geschreven in
2025/2026

DSC10 Winter 2025 Final Exam Questions and Answers University of California

Instelling
DSC10
Vak
DSC10

Voorbeeld van de inhoud

12/5/25, 1:57 PM Winter 2025 Final Exam




Winter 2025 Final Exam
← return to practice.dsc10.com
Instructor(s): Janine Tiefenbruck
This exam was administered in-person. Students were allowed one page of double-
sided handwritten notes. No calculators were allowed. Students had 3 hours to take
this exam.

Problem 1
Lecture 8
While browsing the library, Hermione stumbles upon an old book containing game logs
for all Quidditch matches played at Hogwarts in the 18th century. Quidditch is a sport
played between two houses. It features three types of balls:
Quaffle: Worth 10 points when used to score a goal.
Bludger: Does not contribute points. Instead, used to distract the other team.
Snitch: Worth 150 points when caught. This immediately ends the game.
A game log is a list of actions that occurred during a Quidditch match. Each element of
a game log is a two-letter string where the first letter represents the house that
performed the action ("G" for Gryffindor, , "H" for Hufflepuff, "R" for Ravenclaw, "S"
for Slytherin) and the second letter indicates the type of Quidditch ball used in the
action ("Q" for Quaffle, "B" for Bludger, "S" for Snitch). For example, "RQ" in a game
log represents Ravenclaw scoring with the Quaffle to earn 10 points.
Hermione writes a function, logwarts , to calculate the final score of a Quidditch match
based on the actions in the game log. The inputs are a game log (a list, as described
above) and the full names of the two houses competing. The output is a list of length 4
containing the names of the teams and their corresponding scores. Example behavior
is given below.


https://practice.dsc10.com/wi25-final/index.html 1/27

,12/5/25, 1:57 PM Winter 2025 Final Exam

>>> logwarts(["RQ", "GQ", "RB", "GS"], "Gryffindor", "Ravenclaw")
["Gryffindor", 160, "Ravenclaw", 10]


>>> logwarts(["HB", "HQ", "HQ", "SS"], "Hufflepuff", "Slytherin")
["Hufflepuff", 20, "Slytherin", 150]


Fill in the blanks in the logwarts function below. Note that some of your answers are
used in more than one place in the code.
def logwarts(game_log, team1, team2):
score1 = __(a)__
score2 = __(a)__


for action in game_log:
house = __(b)__
ball = __(c)__


if __(d)__:
__(e)__:
score1 = score1 + 10
__(f)__:
score1 = score1 + 150
else:
__(e)__:
score2 = score2 + 10
__(f)__:
score2 = score2 + 150
return [team1, score1, team2, score2]




Problem 1.1
What goes in blank (a)?
Click to view the solution.

Problem 1.2
https://practice.dsc10.com/wi25-final/index.html 2/27

, 12/5/25, 1:57 PM Winter 2025 Final Exam

What goes in blank (b)?
Click to view the solution.

Problem 1.3
What goes in blank (c)?
Click to view the solution.

Problem 1.4
What goes in blank (d)?
Click to view the solution.

Problem 1.5
What goes in blank (e)?
Click to view the solution.

Problem 1.6
What goes in blank (f)?
Click to view the solution.


Problem 2
Lecture 5, 14
The Death Eaters are a powerful group of dark wizards who oppose Harry Potter and
his allies. Each Death Eater receives a unique identification number based on their
https://practice.dsc10.com/wi25-final/index.html 3/27

Geschreven voor

Instelling
DSC10
Vak
DSC10

Documentinformatie

Geüpload op
20 februari 2026
Aantal pagina's
27
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$36.49
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.
VEVA2K Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2858
Lid sinds
5 jaar
Aantal volgers
2413
Documenten
4403
Laatst verkocht
3 dagen geleden
Affordable, Up-to-date-Quality Nursing Papers

Here, you'll find a wide range of Nursing Papers at an affordable rate. Every student deserves a friendly environment for study. Always message me for any concern and help. My email is

4.1

689 beoordelingen

5
378
4
128
3
101
2
24
1
58

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