Answer to Question #321382 in Python for JoJo

Question #321382

Q11: A travel company wants to fly a plane to the Bahamas. Flying the plane costs 5000 dollars. So far, 29 people have signed up for the trip. If the company charges 200 dollars per ticket, what is the profit made by the company?


 

Fill in values or arithmetic expressions for the variables below.


cost_of_flying_plane = ??? number_of_passengers = ??? price_of_ticket = ???

profit = ???

print('The company makes of a profit of {} dollars'.format(profit))

Q11b Out of the 29 people who took the flight, only 12 buy tickets to return

from the Bahamas on the same plane. If the flying the plane back also costs 5000 dollars, and does the company make an overall profit or loss? The company charges the same fee of 200 dollars per ticket for the return flight. (Optional)


Use an if statement to display the result.



1
Expert's answer
2022-06-15T17:24:23-0400
cost_of_flying_plane = 5000
number_of_passengers = 29
price_of_ticket = 200
returning_passengers = 12
profit = (number_of_passengers * price_of_ticket) - cost_of_flying_plane
print('The company makes of a profit of {} dollars'.format(profit))

total_profit_loss = (returning_passengers * price_of_ticket) - cost_of_flying_plane - profit
if total_profit_loss > 0:
    print('The company makes of a total profit of {} dollars'.format(total_profit_loss))
else:
    print('The company receives a total loss of {} dollars'.format(total_profit_loss))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS