Welcome to CMSC120-F2026! First time here? — Read the Syllabus.
Quick links
- Brightspace (quizzes, journal, submissions)
- Discord (announcements, questions, chat)
Coming up
Everything scheduled this term.
Build a flag in Pyret, replace every repeated number with a name so the whole thing scales from one value, then turn it into a function you can call at three different sizes.
Programs that branch. Small, because Week 2 is a single class.
One question, asked of a whole list. First with the built-in list functions, then by writing one yourself, then about people rather than stripes.
The stripe and the flag drawn in text, with Check.is where where: was. First, a three-question setup survey: a GitHub username, where you run Java, and which Java that is.
Builders that change in place, four predictions checked before they run, and a die you can test because its seed is fixed.
Six small functions that decide: if with return in every branch, ? : in one line, and &&, ||, !, with the examples at the edges.
The cinema’s rules: a chain of ifs in the right order, checked at its edges; enums and switch, with an answer for every value; and records, a value made of named parts.
A1’s flags with Img: stripes that scale from one number, a record and an enum that say which flag, and the reading’s own colors.
A taxi’s day as a list of rides: filter and map for which rides and where to, fold for the takings and the route, each a line with an arrow in it; then seven by hand, with a switch on the list, four of them carrying a value down the calls.
A taxi’s day again, walked with while loops: sums and counts with a name that changes, a loop that stops early, lists that come out backwards; then loops with no list behind them.
Counting loops, a loop inside a loop, and map, filter and fold written by hand; then Pascal’s triangle, and the picture hiding in it.
Every assignment is on the Assignments page, and every week’s reading on the Schedule.