I do not understand these codes on multiple variable optional lab

I do not understand these points on this code:

  1. Save cost J at each iteration

  2. Print cost every at intervals 10 times or as many iterations if < 10

  3. print(f"Iteration {i:4d}: Cost {J_history[-1]:8.2f} ") what is this code .2f

It prints the current iteration as a 4-digit integer, and the most recent value from the cost history formatted as an 8-digit floating point value with two decimal places.

Ok thank u