make_running_average() that returns a function add_sample(value). Each call to add_sample should add value to a running total and count (both tracked via nonlocal in the enclosing scope) and return the current average as a float, rounded to 2 decimal places.avg = make_running_average() avg(10) avg(20) avg(30)
10.0, 15.0, 20.0
After each sample the running average updates: 10/1=10.0, 30/2=15.0, 60/3=20.0.
Declare total = 0 and count = 0 in the outer function, then use `nonlocal total, count` inside add_sample before modifying them.
Return round(total / count, 2) after updating.