[Tutor] python code error
Vignesh Sathiamoorthy
vigneshsathiamoorthy at yahoo.com
Tue Sep 30 19:03:19 CEST 2014
You will find the answer here -
http://stackoverflow.com/questions/625083/python-init-and-self-what-do-they-do
On Sep 29, 2014, at 4:34 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
> On Sun, Sep 28, 2014 at 8:26 AM, Madeleine Austen
> <madeleine.austen at cvcweb.net> wrote:
>> 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
>
> Hi Madeleine,
>
>
> Unlike English class, you're not penalized for copying-and-pasting
> errors for diagnostic, bug tracking purposes. I can tell that you've
> paraphrased the error in some way because what you report has a
> spelling mistake that's not present anywhere in the Python source
> tree.
>
> What you've done is somewhat akin to what happened to the poor Ecce
> Homo painting:
>
> http://en.wikipedia.org/wiki/Ecce_Homo_(El%C3%ADas_Garc%C3%ADa_Mart%C3%ADnez)
>
> in paraphrasing a perfectly good error message. :P
>
>
> Please include the exact error message. When you do so,
> copy-and-paste is your friend. When you see the error message, please
> copy and paste the exact error text. It helps to copy the entire
> error context if it's not too large. Show the program run.
>
>
> Provide more precise information, and that will help folks here give
> you good help. Good luck!
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140930/590dccbb/attachment.html>
More information about the Tutor
mailing list