Goal
- Get you some practice with a few beginning Python concepts.
What to do?
Today, we'll work with these three programs:
For each program in the list above:
- Download the program to your working directory by right-clicking
on the link and choosing "Save Link As" or whatever similar option your
browser gives you.
- Open the sample program in BBEdit or any text editor of your choice.
- Read the program with your partner. Discuss what you think the
program will do.
- Run the program (by typing, for example,
python3 strings0.py
at
the command line. See if your predictions about the program were true.
If not, try to figure out why not.
- Try to answer the questions in the program's comments. You may want
to test your answers by making changes to the program in your text
editor, saving the changes, and running the program again. Play around
with the program until you feel comfortable with all its operations.
Ask questions.
- Move on to the next program.
That's it!
Nothing to hand in. But it's important to study the ideas in these programs
seriously and get your questions answered one way or another, because we're going
to building on these ideas over the next several weeks.