Develop python code that can determine temperature density a
Develop python code that can determine temperature, density, and pressure at any geopotential altitude, h, within the first two layers. I have listed figures from the standard atmosphere within three arrays.
T_set = [288.16,216.66,216.66,282.66,282.66,165.66,165.66,225.66] # list (array) of temperature points that define endpoints of each layer (starting at the ground), K
 h_set = [0,11000,25000,47000,53000,79000,90000,105000] # list (array) of altitude points that define endpoints of each layer (starting at the ground), m
 a_set = [-6.5*10**-3,0,3*10**-3,0,-4.5*10**-3,0,4*10**-3] # list (array) of gradient layer slopes (starting at the ground), K/m
Solution
# declaring arrays
 T_set = [288.16,216.66,216.66,282.66,282.66,165.66,165.66,225.66]
 h_set = [0,11000,25000,47000,53000,79000,90000,105000]
 a_set = [-6.5*10**-3,0,3*10**-3,0,-4.5*10**-3,0,4*10**-3]
# reading input from user
 temp = input(\'Enter altitude: \')
 i = 0
 while i < len(colors):
 if(h_set[i] > temp):
        print(\'Temperature and gradient layer slopes are follows for given altitude\')
        print(T_set[i-1])
        print(a_set[i-1])
 i += 1

