error explanation

Mac Wood malcolm.wood3 at
Mon Sep 29 23:45:44 CEST 2003

Could someone please explain this error message:

Traceback (most recent call last):
  File "C:\Python23\", line 1, in -toplevel-
NameError: name 'time' is not defined

I tried entering the following example:
#This programs calculates rate and distance problems
print "Input a rate and a distance"
rate = input("Rate:")
distance = input("Distance:")
print "Time:",distance/rate

which according to the tutor should have run as this:

> python
Input a rate and a distance
Time: 2
Thanks for your help

More information about the Python-list mailing list