-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindchill.py
More file actions
23 lines (15 loc) · 760 Bytes
/
windchill.py
File metadata and controls
23 lines (15 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#---------------------------------------------------------------------
# Quinn Olney 9/6/2024 windchill.py
#----------------------------------------------------------------------
import stdio
import math
import sys
#Here I am taking the temperature and speed of wind by using the built in input function which allows you
#to ask for input from the command line which makes it more user readable
t = float(sys.argv[1])
v = float(sys.argv[2])
#Then down below we are taking the equation that calculates the windchill, I used the ** operand which is a built in
#python function for exponents
m = 35.74 + (0.6215 * t) + (0.4275 * t - 35.75) * (v ** 0.16)
#finally we output it with a user readable message
stdio.writeln('Your windchill is ' + str(m))