Viewing the Videos or Subscribing to the Podcast

Some of the entries have a picture, which you can click to access the video. Otherwise, to see the videos, use this icon to subscribe to or view the feed:


Or, subscribe in iTunes

Sunday, July 19, 2009

Random Number Problems and Python Solutions

The solutions to these problems are shown:
  1. Produce one or more random integers in the range -5,5
  2. Randomly choose from a sequence like ('Sam', 'Sue', 'Bill')
  3. Randomly choose a number between 1 and 3. Ask the user for a guess. Tell the user if the guess is right.
  4. Display the result of rolling two six-sided dice
  5. Use randint or choice to add an element of randomness to a program of your own design