I updated the picture and code to make it clear where the data fell. I did find a mistake in…