Showing posts with label Chapter 1. Show all posts
Showing posts with label Chapter 1. Show all posts

Monday, September 7, 2009

Hanging Turtles

If you are using idle, some of the initial interactive examples will appear to hang. That is, if the turtle window gets behind another window its impossible to bring it to the front, and/or the window does not get refreshed. This is due to some weird threading interactions between the IDLE GUI and the shell. The problems are frustrating when you run into them in the first chapter. However as you write programs longer than 4 or 5 lines that include the exitOnClick call, they disappear quickly. A couple of suggestions to avoid this initial frustration:

  • Run these first examples from the command line shell. e.g. just type python3.1

  • Run idle using -n command line option. Windows and OS X can also be configured to start idle with -n

  • Carefully setup your idle shell and the turtle window so they are side by side with no other windows to distract.

Wednesday, August 26, 2009

Chapter 1 -- Page 13 -- Problem 1.6

This problem needs better wording, something like

Compute the number of handshakes required for each person in your class to shake hands with every other person exactly one time.

Thursday, February 12, 2009

Chapter 1 Programming Exercise 1.3

This exercise asks the student to generalize the previous exercise from a five pointed star to an n pointed star. The instructions should include the limitation that n will be odd.

Wednesday, February 11, 2009

Chapter 1 Session 1.5 caption

The caption for session 1.5 should read Calculating the volume of a cylinder with assignment statements. The caption in the book incorrectly says sphere.

Chapter 1: Sum of first n integers

The formula on page 8 is a little confusing for our mathematician friends. To be perfectly correct the formula should read:

0349BB8B-EDCB-49E5-8FF3-13CE7E447732.jpg