Your question is Python Average Calculation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Disney+ playback events are represented as a list of dictionaries. Write a function that returns the arithmetic mean of a specified numeric field, ignoring records where that field is absent.
Implement average_field(records, field).
records is a list of dictionaries.field is a string naming the value to average.field is an integer or floating-point number.field, return 0.0.records.def average_field(records, field):