Hi, and apologies if this is the wrong forum, it seemed to be the closest to what I was interested in.
I'm new to programming altogether, and was told Python would be a great place to start. So, here I am, interested in learning Python (unless someone recommends Ruby or something).
I've ran into a bit of a speed-bump, however, with learning how to start. I've found some tutorials and example code, but they all seem to deal with Windows. How do I take the code and execute it?
Is there an application I should use?
This was a script I found...
Now how do I take that and execute it in order to take advantage of its usage (basic Fahrenheit to Celsius converter)?
I tried download the Mac downloader on Python.org but I can't seem to get the IDLE to open, which I guess is a good thing to have.
Can anyone give me a hand? 🙁
I'm new to programming altogether, and was told Python would be a great place to start. So, here I am, interested in learning Python (unless someone recommends Ruby or something).
I've ran into a bit of a speed-bump, however, with learning how to start. I've found some tutorials and example code, but they all seem to deal with Windows. How do I take the code and execute it?
Is there an application I should use?
This was a script I found...
Code:
#!/usr/local/bin/python
import string, sys
# If no arguments were given, print a helpful message
if len(sys.argv)==1:
print 'Usage: celsius temp1 temp2 ...'
sys.exit(0)
# Loop over the arguments
for i in sys.argv[1:]:
try:
fahrenheit=float(string.atoi(i))
except string.atoi_error:
print repr(i), "not a numeric value"
else:
celsius=(fahrenheit-32)*5.0/9.0
print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))
Now how do I take that and execute it in order to take advantage of its usage (basic Fahrenheit to Celsius converter)?
I tried download the Mac downloader on Python.org but I can't seem to get the IDLE to open, which I guess is a good thing to have.
Can anyone give me a hand? 🙁