[Tutor] python code error

Madeleine Austen madeleine.austen at cvcweb.net
Sun Sep 28 17:26:33 CEST 2014


Hi

Here is my code:


from datetime import datetime
timeStart = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
numberPlates = 0
print("There has been {0} number plates since {1}".format (numberPlates,
timeStart))

speedLimit = 25
distance = 1

class NumberPlates:
  """A class that holds information from sensor for ANPR system"""
  distance = 1
def __init__(self, name, enter, exit):
self.number = name
self.enter = enter
self.exit = exit
def speed(self):
    distance = 1
    time = exit - enter
    speed = distance/time
    print(speed)


one = NumberPlates("lemon", 1030, 1050)


one.speed()




It says there are no arguements


Thanks
Madeleine
-- 
*Madeleine Austen*
*11L*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140928/c80e5037/attachment.html>


More information about the Tutor mailing list