Use loops to calculate mean, slope, and range of data

Hi, can you provide a reproducible example? It will make it easier for others to help. A screenshot is not helpful.