| | |
Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write this
Thread Solved
![]() |
•
•
Join Date: Feb 2006
Posts: 43
Reputation:
Solved Threads: 0
Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write this
0
#1 Apr 17th, 2006
Python Syntax (Toggle Plain Text)
# windchill.py # tpm # A program that prints a nicely formatted table of windchill values. from math import * def windchill(t, v): c = 35.74 + (0.6215 * t) - (35.75 * v ** .16) + (.4275 * t * v ** .16) return c def main(): print "MPH:", for k in range (-20, 70, 10): print "%3d" %k, print "_" * 44 for velocity in range (5, 55, 5): print "%3d" %velocity, for temp in range (-20, 70, 10): chill = windchill(temp, velocity) print "%3d" %round(chill), main()
Last edited by alc6379; Apr 17th, 2006 at 9:01 pm.
Re: Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write
0
#2 Apr 17th, 2006
Assuming the formula is right, looks basically fine to me. Just be sure to remove the spaces from the main() subroutine you call at the end, there. Good Job!
A handy tip:
Be sure to place [code][/code] tags around your code. It's especially important with Python, because the spaces actually are part of the code structure.
A handy tip:
Be sure to place [code][/code] tags around your code. It's especially important with Python, because the spaces actually are part of the code structure.
Alex Cavnar, aka alc6379
•
•
Join Date: Feb 2006
Posts: 43
Reputation:
Solved Threads: 0
Re: Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write
0
#3 Apr 18th, 2006
•
•
Join Date: Feb 2006
Posts: 43
Reputation:
Solved Threads: 0
Re: Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write this
0
#4 Apr 19th, 2006
Re: Did I do the windchill index correctly.Due in 18hrs.Is there other ways to write
0
#5 Apr 19th, 2006
![]() |
Similar Threads
- Did I do this correctly..Due in 11hrs..Can this program be written in other ways? (Python)
- New 2 C++, help with finding erros (C++)
- loads htm but not aspx (ASP.NET)
Other Threads in the Python Forum
- Previous Thread: Here Is Another Way I Wrote This Program Which Is Due
- Next Thread: Printing
| Thread Tools | Search this Thread |
alarm anydbm app assignment beginner bluetooth character cipher cmd conversion coordinates corners curves customdialog cx-freeze data decimals definedlines development directory dynamic excel exe feet file float format function generator getvalue gnu graphics halp handling homework http ideas input ip itunes keycontrol leftmouse line linux list lists loan loop maintain maze millimeter module mouse number numbers output parsing path prime programming push py2exe pygame pymailer python queue random raw_input recursion recursive schedule screensaverloopinactive script searchingfile slicenotation sqlite ssh string strings sudokusolver text time tlapse tooltip tuple type ubuntu unicode url urllib urllib2 variable ventrilo vigenere web webservice wikipedia wxpython xlib xlwt






