29 lines
727 B
Plaintext
29 lines
727 B
Plaintext
From: jeremy at cnri.reston.va.us (Jeremy Hylton)
|
|
Date: Thu, 29 Apr 1999 18:57:19 -0400 (EDT)
|
|
Subject: Errors
|
|
In-Reply-To: <3728CD26.907ED9A1@geocities.com>
|
|
References: <3728CD26.907ED9A1@geocities.com>
|
|
Message-ID: <14120.58236.608143.792577@bitdiddle.cnri.reston.va.us>
|
|
X-UID: 1388
|
|
|
|
You need to initialize tally first. You're getting a NameError
|
|
because the first reference to tally is on the right hand side of the
|
|
first assignment. Python is looking up tally and not finding it,
|
|
because you haven't assigned to it yet.
|
|
|
|
>>> tally = tally + 1
|
|
Traceback (innermost last):
|
|
File "<stdin>", line 1, in ?
|
|
NameError: tally
|
|
|
|
vs.
|
|
|
|
>>> tally = 0
|
|
>>> tally = tally + 1
|
|
|
|
Jeremy
|
|
|
|
|
|
|
|
|