I am planning on taking a trip to Disney World late this summer and I have been trying to make a program to calculate an approximate cost of the trip for fun and to try and keep myself from getting too rusty. My problem is that when I try to display all of my calculated values, I keep receiving the error that is in the title. My code is:
###Function to display costs
def Display(days, nights, building_type, person, room_cost,
room_cost_person, DisneyPark, Hopper, IslandPark,
IslandPTP, Island_parking, gas_cost, gas_cost_person,
park_person, Total_cost_person, mpg, gas, downpay):
print('''Cost of trip for a %i day/%i night stay in a %%s%%:
Number of people going: %i
Total room cost ($) %4.2f
Room cost/person ($) %4.2f
Price of Disney World tickets ($) %4.2f
Price of hopper ticket-Disney ($) %4.2f
Price of Universal ticket ($) %4.2f
Park-to-Park %%s%%
Cost to park at Universal/person ($) %4.2f
Total cost of gas ($) %4.2f
Cost of gas/person ($)* %4.2f
Cost to park/person ($) %4.2f
Cost of groceries/person ($)^ %4.2f
Cost to eat out/person ($)^# %4.2f
Souvenirs ($)^ %4.2f
Total cost of trip/person ($) %4.2f
*Factoring in round trip distance (1490 miles), mpg of %i, and average gas cost $%4.2f
#Covers eating out at night, eating in parks (butterbeer, etc), and eating while driving
^Note that these are estimates
%Note that the Villa housing requires a $%4.2f downpayment (refundable) that was not
included in cost calculations
----------------------------------------------------------------------------------------'''
%(day, night, Building, person, room_cost, room_cost_person, DisneyPark,
Hopper, IslandPark, IslandPTP, Island_parking, gas_cost, gas_cost_person,
park_person, Groceries, Eat, Souvenirs, Total_cost_person, mpg, gas,
downpay))
I've looked at the suggestions for this question:Python MySQLdb issues (TypeError: %d format: a number is required, not str) and I tried to make the changes stated but they were not of help to me. I can individually print each value just fine but when I try to print them all in this large block of text I then get my error. I'd appreciate any insight anyone has to offer.