Traceback (most recent call last):

Rachel cuteapple48 at
Wed Mar 24 03:10:17 CET 2004

I am new here, no idea how to use python, but I am running out of time
to complete my assignment. Following is the code that given by
assignment but with bug which I have no idea how to debug.

# Temperature Conversion program called


import string, sys


# If no arguments were given, print a helpful message

if len(sys.argv)==1:

    print 'Usage: celsius temp1 temp2 ...'


# Loop over the arguments

for i in sys.argv[1:]:



    except string.atoi_error:

      print repr(i), "not a numeric value"



      print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))

After I type in the above code in new window save as
when I click Run Module, Python show me the following error message

Usage: celsius temp1 temp2 ...

Traceback (most recent call last):
  File "C:/Python23/", line 15, in -toplevel-
SystemExit: 0

Anyone have idea how to solve this up... I am using python 2.3(IDLE)
(Python GUI)

Deadline of assignment is on next monday.

More information about the Python-list mailing list