Just do the python code and the basic equations for the code according to the attached assignment.

Just do the python code and the basic equations for the code according to the attached assignment. I will do the report part.