Write a NumPy program to convert the values of Centigrade degrees into Fahrenheit degrees. Centigrade values are stored into a NumPy array.Sample Array [0, 12, 45.21 ,34, 99.91]
import numpy as np fvalues = [0, 12, 45.21, 34, 99.91] F = np.array(fvalues) print("Values in Fahrenheit degrees:") print(F) print("Values in Centigrade degrees:") print(5*F/9 - 5*32/9)
Sample Output:
Values in Fahrenheit degrees: [ 0. 12. 45.21 34. 99.91] Values in Centigrade degrees: [-17.77777778 -11.11111111 7.33888889 1.11111111 37.72777778]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer