PDA

View Full Version : Python Programming Brahs....



Lilluda_5
02-01-2011, 06:14 PM
I need help with a couple noob questions. These are the only two I can't answer measly reps for answers.



Formatted Printing

Using the % operator, explain what formats you would use to get the following outputs:

"___" => % 34.5 => "34.50"

"___" => % 34.5 => "3.45e+01"
"___" => % 8 => "0008"
"___" % 8 => "8 "


Second Question

In the United States, a car's fuel efficiency is measured in miles per gallon. In the metric system it is usually measured in liters per 100 km.

Write a function called convert_mileage that converts from miles per gallon to liters per 100 kilometers.



Thanks brahs..

Lilluda_5
02-01-2011, 07:02 PM
bump

Lilluda_5
02-01-2011, 08:33 PM
bump brahs

Lilluda_5
02-02-2011, 10:05 AM
bump