# Author: Steven Carr # Last Edited: October 2021 # Calculates the wind chill based on user input import stdio import sys import math # Two user inputs as potential decimals t = float(sys.argv[1]) v = float(sys.argv[2]) # Equation to calculate Wind Chill w = 35.74 + (0.6215 * t) + ((0.4275 * t) - 35.75) * (v ** 0.16) # If t > 50, ONLY print 'Value of t must be <= 50 F if t > 50: stdio.writeln('Value of t must be <= 50 F') # If v <= 3 and t > 50, print same as above, if ONLY v <= 3 but # t <= 50, print 'Value of v must be > 3 mph if v <= 3: if v <= 3 and t > 50: stdio.writeln('Value of t must be <= 50 F') if v <= 3 and t <= 50: stdio.writeln('Value of v must be > 3 mph') # If both t and v meet the correct parameters, output the # calculation for w if v > 3 and t <= 50: stdio.writeln(w)