CS 145 Lab 8 – Spinner
Welcome to lab 8! Our goal in this lab is to continue our discussion of loops, but also get some more practice with images and the GifSequenceWriter that you are using in homework 4. Because we’re going to use some code that I’ve provided to you in the homework 4 SpecChecker, you’ll need to complete […]
CS1: Lecture 26 – Looping Patterns
Dear students, So far we’ve used loops to traverse 1D spaces: the number line, files, and a sequence of random events like coin flipping. Today we bust out into 2D spaces, traversing images and other Cartesian grids. Nesting Loops To transition to our next concept, let’s write a program to mimic the activity we see […]
CS1: Lecture 25 – Loops Continued
Dear students, You know that trope in movies where someone invents a new technology? At first it seems to be doing going good, but then it starts to get out of control. That’s where we are in the semester. Our software up until this point was very mild and had a limited reach. Now we […]
CS 148 Lab 8 – Loops
Welcome to lab 8! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. In this lab, we’ll explore loops, which let […]
CS 145 Lab 7 – Loops
Welcome to lab 7! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. In this lab, we’ll explore loops, which let […]
CS1: Lecture 24 – For Loops
Dear students, While loops put a heartbeat in our code that makes it feel alive. We can feel the CPU pulse through our data while we sit back and await the result. But while is not the only way to make code repeat. Today we consider the for loop. For Loops Last week we broke […]
CS1: Lecture 23 – While Loops Continued
Dear students, Loops turn us into pattern hunters. Behind some complex output is a much simpler machine using repetition. Let’s keep building those repetitive machines today. We’ll keep exploring while loops. While Last time we introduced while. Let’s see it at work in a few more programs. Write a program that starts with a number […]
CS1: Lecture 22 – While Loops
Dear students, Today we extend the notion of a Computer as Pilot to not just yaw left or right as it navigates through our code, but to also swoop back around to code that it has run previously. But first we examine some situations where developers write conditional statements that they shouldn’t have written. If […]
CS 148 Lab 7 – Conditional Statements
Welcome to lab 7! If you have checkpoints from the last lab to show your instructor or TA, do so immediately. No credit will be given if you have not already completed the work, nor will credit be given after the first 10 minutes of this lab. In this lab, we’ll explore conditional statements, which […]
CS1: Lecture 21 – If Ladders
Dear students, Our programs have completed optional work with the diversion pattern. Our programs have chosen between two actions with the bifurcation pattern. Today we look at the making n-way choices with the ladder pattern. Ladders Suppose you’ve got an app that measures the pH of something—the food your about to ingest, perhaps. You want […]