[Tutor] Need Assistants with Python Please

Jared White dukelx2005 at gmail.com
Sun Mar 15 15:13:56 CET 2009


Good Morning Everyone,

I am having a little issue with Python,

Hopefully Someone Can Help Me....

I am trying to Develop a Python program that converts a single fuel rating
from mpg to lp100km.

So far ive come up with this code.  But it seems not to be working,  Can
someone please help me figure out what ive done wrong

def main ():
    print "The program converts Miles Per Gallon (US) to Liters Per 100
Kilometer."
    kilometers = input ("What is the Miles Per Gallon?")
    MilesperUSGallon * (1.60934/3.78541) = kilometersperliter. 1/(kilometers
per liter) = liters per kilometer. Liters/kilometer * 100 = liters per 100
km.
    print "The Distance in Miles per Gallon", miles\

main ()


But is has giving me an error like ive done something wrong with the
spacing.. Can someone please check my work to see what ive done wrong here.


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090315/17f25529/attachment.htm>


More information about the Tutor mailing list