Week 4 Assignments


This week, we will look at how computers evaluate arithmetic expressions. We will introduce the concept of “operator precedence” in this discussion.

We will also look more closely at how repetition (loops) help work on real problems. This is a fundamental tool you need to understand, so you can use loops in your problem solving.

Here are the lectures for this week:

Although the timing is not that great, we are due for our first exam. This one will be available in all aCC Testing Centers the week after Spring Break. You will have until Sunday od that week to get this done.


In this week’s homework you get to do a bit of math the old fashioned way. No calculators for this work. Instead you need to figure out how that silly computer does math, using a mix of integers and floating point numbers, and that precedence stuff!

Ultimately, we will do math using variables, and there will be few actual numbers in your programs. I actually hate bare numbers in code. I call them “magic numbers” because I have no idea why they are there or what they mean. Is 17 a good thing to type when you mean :number of students”?

Lab 3

In this week’s lab, we will draw some shapes using Scratch. This is a chance to practice using modules, something that will be hugely important in your later programs. You also get to do a bit of searching for example code written by “other people”. Be sure to indicate where you get this code, otherwise, you are a pirate, and you WILL get in trouble!