Put the lesson Introduction to NumPy into practice by writing a program yourself.
A heat-treatment schedule holds a sample at 25, 150, 300, 450 and 600 °C.
Use a NumPy array to convert every temperature to kelvin in one step, without a loop, then work out the mean temperature.
np.Mean: 578.15 K using np.mean() (2 decimal places).[298.15 423.15 573.15 723.15 873.15] Mean: 578.15 K
Write your program below and press Run. Each run is checked against the expected output.
Press Run to see what your program prints.
One possible solution. Other programs that print the same output are correct too.
import numpy as npcelsius = np.array([25, 150, 300, 450, 600])kelvin = celsius + 273.15print(kelvin)print(f"Mean: {np.mean(kelvin):.2f} K")