[Tutor] bug in exam score conversion program
Kent Johnson
kent37 at tds.net
Sat Oct 4 19:23:33 CEST 2008
On Sat, Oct 4, 2008 at 12:55 PM, David <david at abbottdavid.com> wrote:
> When I run it from the idle it works perfect, but when I run it from a
> file I get none, why is that?
> score = raw_input("What is your exam score: (0-100)? ")
The value returned from raw_input() is a string; you have to convert
it to an int:
score = int(raw_input("What is your exam score: (0-100)? "))
Kent
More information about the Tutor
mailing list