title: ValueError for string conversion to float, but input is a float
body: <p>Solving for:
  Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Your program must define and call the following driving_cost() function. Given input parameters driven_miles, miles_per_gallon, and dollars_per_gallon, the function returns the dollar cost to drive those miles.
  def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon)
  Your program should call the function three times to determine the gas cost for 10 miles, 50    miles, and 400 miles.
  Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))</p>
  <p>I don't know if my tests will pass since I can't run it - Python giving valueerror on miles_per_gallon stating cannot convert string to float, but I requested a float input in the code... Please help - here's what I have:</p>
  <pre><code>    def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):        
              total_cost = driven_miles * per_mile   
              return total_cost        
      
      miles_per_gallon = float(input())    
      dollars_per_gallon = float(input())
      per_mile = miles_per_gallon * dollars_per_gallon
  
      if __name__ == '__main__':        
          driving_cost(10, miles_per_gallon, dollars_per_gallon)
          driving_cost(50, miles_per_gallon, dollars_per_gallon)
          driving_cost(400, miles_per_gallon, dollars_per_gallon)
          print('{:.2f}'.format(total_cost))
  </code></pre>
  <p>If there is a better way to code this using the rules above, please advise. I'm a NOVICE completely. I was thinking maybe defining a list for driven_miles(10,50,400)...would that be better? Thanks</p>