CS50 Quiz 2018
This quiz is open-book: you may use any and all non-human resources during the quiz, but the only humans to whom you may turn for help or from whom you may receive help are the course’s heads, which means that
-
browse and search the Internet,
-
review books,
-
review questions and answers already posted on CS50 Discourse,
-
review the course’s own materials,
-
use CS50 IDE or CS50 Sandbox, and
-
email the course’s heads at heads@cs50.yale.edu to ask administrative questions, but
-
receive or solicit directly or indirectly any help from anyone other than the course’s heads via email.
Take care to review the course’s policy on academic honesty in its entirety. Note particularly, but not only, that
-
looking at another individual’s work during the quiz is not reasonable and
-
turning to humans (besides the course’s heads) for help or receiving help from humans (besides the course’s heads) during the quiz is not reasonable.
Unless otherwise noted, you may call any functions we’ve encountered this term in code that you write. You needn’t comment code that you write, but comments may help in cases of partial credit. If having difficulty with code, you may resort to pseudocode for potential partial credit.
Among the quiz’s aims is to assess your newfound comfort with the course’s material and your ability to apply the course’s lessons to familiar and unfamiliar problems. And most problems aspire to teach something new.
Setup
-
Log into CS50 IDE.
-
Execute:
cd ~/workspace/ wget http://cdn.cs50.net/2018/fall/quiz/quiz.zip unzip quiz.zip rm quiz.zip cd quiz/
Inside of
quiz/
, you should find the files that shall (soon!) contain your answers to this quiz’s problems.
Problems
Solve each of the problems below, in any order.
Confine all answers to the specified files (whose filenames end in .md
, .c
, .html
, or .py
, depending on the question); only those files will be evaluated.
FAQs
Force-refresh this page (and each problem’s page) throughout the week to see any changes made to the quiz.
Here are clarifications we’ve made to the quiz since its release in answer to FAQs. All of these have been incorporated into the problems themselves, so it suffices to force-refresh each problem’s page to see any clarifications therein.
-
Mon 11/12, 10:15pm
-
In 5.3, it suffices to match friends' names case-sensitively: if
Bill Gates
is a key inFRIENDS
, you need only matchBill Gates
, notbill gates
, ins
. -
In 7.6, your implementation of
slant
should indeed be inslanted.py
, notslant.py
. An earlier version ofslanted.py
inquiz.zip
incorrectly printedUsage: python slant.py depth
instead ofUsage: python slanted.py depth
, but no need to correct that output if you downloaded the earlier version.
-
-
Mon 11/12, 5:45pm
-
In 5.3, do not assume that
s
will contain only one friend’s name, but do assume that each friend’s name will appear only once or not at all. No need to tokenizes
; it suffices to find and replace each friend’s name ins
, in any order, even if it happens to be (nonsensically) a substring of some other name or words. -
Fixed downloadability of sample BMP, JPG, and PDF.
-
-
Sun 11/11, 8:30pm
-
In 8.3, reworded for clarity as "if you execute your compiled C version."
-
-
Sat 11/10, 6:45pm
How to Submit
update50
cd ~/workspace/quiz/
submit50 cs50/2018/fall/quiz