Here is what I'm trying to do, accept a price of gas, but I want to add the .009 to the price, so that people do not have to type the full amount. Example, 3.49 /gallon would return 3.499 /gallon.
This is what I have tried and the results of it. def gas_price(price): price == raw_input("What is the price of gas?") return price + .09 3.49=> 3.4899999999999998 It reduces the number and then adds many decimal points after. Thanks for any help, I am sure this is an easy one for someone.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor