Session 30

The End of the Day


CS 1510
Introduction to Computing


Opening Exercise

This is a quickie. I have a function called average that takes three number arguments and returns a single number:

    def average(num_1, num_2, num_3):
        return (num_1 + num_2 + num_3) // 3
If all three of the numbers are in the range(0, 256), then the return value is also in the range(0, 256).

Write another Python function f(num_1, num_2, num_3) that receives three numbers in the range(0, 256) and returns a single number in the range(0, 256). Be creative!

How creative were you?



Fun with Images

Back in Session 1, I opened with a little story about steganography and later talked about how it related to computer science. Those stories dealt with representing images as big collections of numbers. However, we never programmed with images this semester. Let's do a little now, for a light end to the course.

Quick review:

Look at code:

... do stego?



Quick Review

Please answer these three questions about what you learned in this class this semester. (No names, please.)

... take stock of the answers.

In the notes for Session 1, we see:

What is Computer Science?

What did my talk about camouflage have to do with computer science?

The big ideas: names and values, abstract data and function. Language. Breaking down problems.

Advice for future courses: Ask questions early. This is how your professors find out what is and isn't working. When they know that, they can make adjustments.



Wrap Up



Eugene Wallingford ..... wallingf@cs.uni.edu ..... December 11, 2014