76.2k views
3 votes
Output the average of flight delays and the average of flight cancellations, with two digits after the decimal point. Follow the output format in the example below.

a) True
b) False

User Anup Gupta
by
8.0k points

1 Answer

1 vote

Final answer:

To calculate the averages of flight delays and cancellations, sum the total delays and cancellations respectively, divide by their counts, and format the results to two decimal places.

Step-by-step explanation:

To calculate the average of flight delays and the average of flight cancellations, you'll first need to sum the total duration of delays and count the total number of delayed flights, then sum the total number of cancellations and count the cancelled flights. Once you have these totals, you can calculate the averages by dividing the total duration by the count of delays, and the total number of cancellations by the count of cancelled flights. The averages should be formatted to two decimal places.

Here's an example:

  • Sum of delay durations: 400 minutes
  • Number of delayed flights: 10
  • Sum of cancellations: 5 flights
  • Number of flights (for cancellations): 100

To find the averages:

  1. Average delay = Total delay duration / Number of delayed flights
    = 400 minutes / 10 flights
    = 40 minutes per flight
  2. Average cancellations = Total cancellations / Number of flights
    = 5 cancellations / 100 flights
    = 0.05 cancellations per flight

Formatted with two decimal places:

  • Average delay: 40.00 minutes
  • Average cancellations: 0.05

User Xi Wei
by
7.6k points