im doing some h.w for my introduction to programming

and the book tells me to put this

# file chaos.py
# a simple program illustrating chaotic behavior.

def main():
print "this program illustrates a chaotic function"
x=input("enter a number between 0 and 1:")
for i in range(10):
print x

and then i tells me to save it so i do that i name it chaos.py so i reopen python again and try doing import chaos

>>> import chaos

Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import chaos
File "C:\Python23\chaos.py", line 1
Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32
SyntaxError: invalid syntax

i get this wtf im doing wrong is supposed to run the thing like the book says but i cant get it to do that

then i also try putting chaos.main() and doesnt do anything what im doing wrong?

any help is appreciated
my guitar stuff:
ESP JH-600
ValveKing 112
DigiTech Whammy Pedal
Taylor 314CE
Dunlop SW-95 Slash Wah Pedal
Cordoba C7 Nylon String Acoustic Guitar
Metal muff
Fender American Deluxe Stratocaster Ash