0

Hello,everybody!
I write my first Python script in file Fibonacci.py in Linux as the fallowing:

a,b = 0,1
while b < 10:
    print b
    a,b = b,a+b

When I want to run it,I must input these command in the command line:
> python Fibonacci.py

I want to know what should I do then I can run it directly by the command:
> Fibonacci.py

It's my first Python program which looks in a babyhood! Help me,please!
Thanks!:)

1
Contributor
1
Reply
3
Views
10 Years
Discussion Span
Last Post by meiyantao
0

Oh,I konw it. Just the same as shell;)
#!/usr/bin/python
[……]

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.