Week 6

Learning objectives

Upon finishing this learning module, you should be able to:

  • Describe the goals of higher level programming languages and how they relate to machine code
  • Uses branches in the Little Computer to make decisions
  • Use conditionals in Python

Class Schedule

First Class Meeting

  • Little Computer Assembly and Branching
  • High level programming
  • Work on Programming

Independent:

  • Little Computer Assembly & Branch worksheets
  • Programming - Complete Ch 22
  • Programming - Ch 23 Reading

Second Class Meeting

  • Algorithm of the Week - Compression
  • Work on Programming

Independent:

  • Algorithm of the Week reading
  • Programming - Complete Ch 23
  • Programming - Ch 24 Reading

Programming

Do the following assignments based on Programming chapters from Welcome To CS. Completion assignments are graded for accuracy. Reading assignments are graded for attempting all of the interactive elements on the assigned pages.

  • Ch 22 - Completion
  • Ch 23 - Reading & Completion
  • Ch 24 - Reading - Stop when you hit the Chapter Summary
Make sure you are logged into the book so your work is saved and you get credit. The surest way to make sure you are logged in is to start the programming assignment by clicking on the button in the corresponding assignment in Elearn.

Assembly & The Little Computer


Little Computer Branching

Last week, we saw how a simple computer would process information and use its memory. This week, we will look at how it could use branch instructions to allow us to say things like "if the number is positive, do this, otherwise do that" and "go back to instruction 4"


Higher Level Programming Languages

Read the rest of Ch 7 in Welcome to CS. It describes how the higher level programming languages (like the Python you are learning) relate to assembly and machine language.


Algorithm of the Week: Data Compression

  • Read Ch 7 of Nine Algorithms That Changed the Future

  • Read this Data Compression supplement. It demonstrates how to build a Huffman code - a version of the Shortest Symbol trick from Nine Algorithms.

  • Do the compression practice worksheet (Class Files in elearn)


Optional Extras

How big-data and computation are transforming medicine: