66 print("\nThe conversion result of PM2.5 particle concentration: ")
67 print("- AQI: {}".format(aqi))
68 elif choice == "2":
69 pm10_concentration = float(input("\nEnter the PM10 particle concentration value (in µg/m³): "))70 aqi = calc_aqi_us(pm10_concentration, 'PM10')
71 print("\nThe conversion result of PM10 particle concentration: ")
72 print("- AQI: {}".format(aqi))
61 choice = input("\nOption: ")
62
63 if choice == "1":
64 pm25_concentration = float(input("\nEnter the PM2.5 particle concentration value (in µg/m³): "))65 aqi = calc_aqi_us(pm25_concentration, 'PM2.5')
66 print("\nThe conversion result of PM2.5 particle concentration: ")
67 print("- AQI: {}".format(aqi))
47 while concentration > c_high[i_low]:
48 i_low += 1
49 i_high = i_low
50 aqi = round(((aqi_high[i_high] - aqi_low[i_low]) / (c_high[i_high] - c_low[i_low])) * (concentration - c_low[i_low]) + aqi_low[i_low])51 return aqi
52
53#Function to prompt user for input and calculate PM2.5 and PM10 concentrations and AQI.
20 aqi = ((i_high[i] - i_low[i]) / (c_high[i] - item)) * (c - item) + i_low[i]
21 return round(aqi, 1)
22 if c > c_high[-1]:
23 aqi = ((i_high[-1] - i_low[-1]) / (c_high[-1] - c_low[-1])) * (c - c_low[-1]) + i_low[-1]24 return round(aqi, 1)
25 else:
26 return 'Input concentration is below AQI scale'
Line length greater than configured max_line_length
detected, defaults to 79 character. This limit can be configured docs