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
Exam (elaborations)

DSC10 Winter 2025 Final Exam Questions and Answers University of California

Rating
-
Sold
-
Pages
27
Grade
A+
Uploaded on
20-02-2026
Written in
2025/2026

DSC10 Winter 2025 Final Exam Questions and Answers University of California

Institution
DSC10
Course
DSC10

Content preview

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

Written for

Institution
DSC10
Course
DSC10

Document information

Uploaded on
February 20, 2026
Number of pages
27
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

€32,24
Get access to the full document:

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

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.
VEVA2K Self
Follow You need to be logged in order to follow users or courses
Sold
2858
Member since
5 year
Number of followers
2413
Documents
4403
Last sold
3 days ago
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 reviews

5
378
4
128
3
101
2
24
1
58

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