Comments

The first line specifies the interpreter of the script
(here the first python program in your path)
python hw.py 1.4   # first line is treated as comment
./hw.py 1.4        # first line is used to specify an interpreter
Even simple scripts must load modules:
import sys, math  
Numbers and strings are two different types:
r = sys.argv[1]         # r is string
s = math.sin(float(r))  

# sin expects number, not string r
# s becomes a floating-point number

previousnexttable of contents