This is my updated submission for my final homework in…