Assignment 4 -- Scratch Programming
Total Points: 100
Due Date: October 22, 12:00
noon EST (if you would like to get an early head start, I recommend
starting with the "Getting Started with Scratch" section first.
This problem set is adapted from the Scratch problem set used in CSCI
S-1 and CSCI S-111a by instructors Henry Leitner and David Malan. I take
full responsibility for all errors in it (and any pain and suffering
caused to my students while doing it!) Understanding Algorithms
10 points
Suppose you are applying for a job at the Harvard Square branch of the
accounting firm, Dewey, Cheatham, and Howe. At your interview, the human
resources manager decides to test your ability to focus on boring tasks.
She hands you several printouts on which there appears on every line
an account number, and next to it a balance expressed in dollars.
Your task is simply to locate the bank account that has the LARGEST balance,
and report this result. Unfortunately, it appears there are hundreds
and hundreds of these accounts (each of them unique), possibly thousands
of them.
In precise, clear unambiguous English, devise an algorithm that solves
this problem, even though the actual “execution” might take
you a very long time. By the way, the account numbers do not appear in
any particular order.
Getting Started with Scratch
10 points
- Download Scratch: If not already installed on the computer you’re
using, download Scratch from the URL: http://scratch.mit.edu/pages/download
- Install Scratch: On
a Windows computer, you will need to “install” it, simply
double-clicking the .exe file you downloaded, moving, if you so choose,
the Scratch software folder to your desktop or elsewhere on your hard
drive. The installation process is quite a bit easier on a Mac: just
look inside the Scratch folder for the application and double-click
to use it. Put the whole Scratch folder in your applications folder
if you choose.
- Download our class examples: http://www.eecs.harvard.edu/~nesson/e4/e4ScratchExamples.zip --
again, we are indebted to Dr. Leitner and Mr. Malan for the use of
these examples.
- Uncompress and relocate the class examples: After you have "uncompressed" this
file, you should have a folder named
cs1ScratchExamples on your desktop. You can move or copy this folder
into the Projects folder that resides inside of the Scratch software
folder:

- Launch Scratch: Go ahead and launch Scratch by opening its
folder and double-clicking its cat-like icon:
.
- Play Oscartime: Once the software has started up, click the “Open” button
toward its top-left corner. In the window that appears, you should
see categorized folders of sample projects. Open David Malan’s
Oscartime within the “cs1ScratchExamples” folder. Enter “Presentation
Mode” by clicking the icon of an easel
below Oscartime’s lamp post; Oscartime should fill most of your
screen. Click the green flag toward the screen’s top-right corner.
Yes, go ahead and play Oscartime. As many times as you’d like,
in fact. When done procrastinating, stop the game, if necessary, by
clicking the red button toward the screen’s top-right corner.
To exit “Presentation Mode,” hit Esc on your keyboard.
- Get your points!: Record and submit your high score from Oscartime.
More Getting Started with Scratch
10 points
- To be walked through the process of making a project from scratch1,
surf on over to Scratch’s home page at http://scratch.mit.edu/howto.
Click the link entitled “Getting Started” on that page
and peruse the guide’s PDF for some step-by-step instructions
on how to use Scratch. Carry out as many of these exercises as you
can, until you feel you have a good sense for the Scratch software.
- Make
yourself aware of Scratch’s Help Screens, available at: http://llk.media.mit.edu/projects/scratch/help/.
You might also want to consider signing up for a free account at the
scratch website; this will allow you to upload and download Scratch
projects and conveniently share your work with a global user community.
- Go ahead and open a few more projects from the cs1ScratchExamples
folder, even some of those that you already saw in lecture. For each
project of
interest
to you,
run
it
to see how it works; then, look over its scripts to understand how
it works. Feel free to make changes to scripts and observe the effects.
Once you can say to yourself, “Okay, I think
I get this,” about one of the projects we did not go over in lecture,
write one paragraph that identifies the project that you looked at and
explains in English how the program works.
Do Your Own Thing!
50 points
And now your real adventure begins! Your task for this problem
is, quite simply, to have fun with Scratch and implement a project
of your
choice
(be it a game, an animation, or something else), subject only to
the following requirements.
- Your project’s filename must be firstname_lastname.scratch,
where, of course firstname and lastname are your own first and last
name.
- Your project must have at least two sprites, neither of which
may be a cat.
- Your project must contain at least three scripts
in total (i.e., not necessarily per sprite).
- Your project must
use at least one condition, one loop, and one variable.
- Your project
must use at least one sound.
- Your project should be more complex than the simple, short examples
that are described in the lecture notes (and appear also in your
cs1ScratchExamples folder) but it can be less complex than Oscartime.
Its complexity should be more on par with the other projects that
come with Scratch. Thus your project should probably use a few dozen
puzzle pieces overall.
Feel free to look through the projects that come with Scratch for
inspiration, but your own project should not be terribly similar to
any of them. Try to think of an idea on your own, and then set out
to implement it. If, along the way, you find it too difficult to implement
some feature, try not to fret: alter your design or work around the
problem. If you set out to implement an idea you find fun, you should
not find it hard to satisfy this problem’s requirements.
If you suspect your program might fall short of our expectations, feel
free to ask for our opinion prior to submitting. All right, off you
go. Impress us!
Once done with your project, surf on over to http://scratch.mit.edu/signup and sign up for a Scratch account. Choose any username you'd like,
but be sure to remember it and your password!
Then, within the Scratch software itself (not on the website), click
the "Share" button
and upload your project to MIT's Scratch Server, using the same username
and password with which you just signed up for an account.
Once your project's been uploaded, surf on over to http://scratch.mit.edu/galleries/view/5368 and
subscribe to the course's gallery by clicking the "subscribe" button
that appears on the right-hand side of the page. (You'll need to be
logged in.) Finally, click "my stuff" toward
the top of the page, click the checkbox below the project you just
uploaded, click "add
to gallery", and add your project to the course's gallery. Be
sure it got added by re-visiting http://scratch.mit.edu/galleries/view/5368 and
verifying that your project is now listed!
Explain Your Own Thing
10 points
In a short paragraph, tell us what your project does (or how to use
it). In one or more longer paragraphs, explain how your project works,
noting the purpose of each sprite and script. Evaluate Your Experience
10 points
Create a text file (using NotePad on Windows, or TextEdit on Mac)
called questions.txt. Place your answers to the following questions
in that text file and submit it as an attachment with your homework
submission.
- Roughly how much time did you spend implementing firstname_lastname.scratch?
- Did you base firstname_lastname.scratch on some project that came
with Scratch or that was demonstrated in lecture? If so, which one?
- Prior to implementing firstname_lastname.scratch, had you ever
programmed before? If so, for how long and in what language(s)?
- In
one or two short paragraphs, tell us what you think of Scratch. Do
you like it? What’s good about it? What’s bad about it?
Did you enjoy implementing firstname_lastname.scratch?
- In a short
paragraph, what do you feel you learned by using Scratch?
- In implementing
firstname_lastname.scratch, with what concepts or implementation
details did you struggle? Why?
|