On 2013-04-11, eschneide...@comcast.net
<eschneide...@comcast.net> wrote:
> If you get the time, please post an example, because I don't
> understand.

Maybe it would help to think about contraints. Write them next to
your variable names, and then check, at every point in your
program, if the contraint is still true.

Here's and example.

maximum_games = 4  # You must stop playing after 4 games.
games_played = 0   # Always equals the number of games played
while games_played < maximum_games:
    play_game()
    # This is where you update games_played to reflect the number
    # of games played.
  
-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to