Aan de slagGa gratis aan de slag

Determine engine types in wildlife strikes

Since 1992, the Federal Aviation Administration has been tracking wildlife strikes by commercial and military aircraft. This data helps prevent catastrophic crashes and decreases the impact on endangered species.

Some data related to wildlife strikes in California is loaded into the session. For each strike, the FAA records the engine type of the aircraft involved.

  • The list engine_types_labels contains descriptors of the five different types of engines.
  • The NumPy array engine_types contains the integers 0 through 4, specifying the type of engine, where the integer corresponds to the index of the engine_types_labels list.

Create a histogram of the frequency of strikes of aircraft of each engine type.

Deze oefening maakt deel uit van de cursus

Python for MATLAB Users

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create the histogram with one bin for each unique value in engine_types
plt.____()
plt.____(____, bins = [0,1,2,3,4,5])

# Show the plot
Code bewerken en uitvoeren