MrAnsell
January 13th, 2010, 07:59 PM
Hello i am just learning the basics of python and i have a problem running a small simple prgram i have written here is what happens in terminal :
admin2@admin2-laptop:~$ cd Documents
admin2@admin2-laptop:~/Documents$ chmod +x heloo.py
admin2@admin2-laptop:~/Documents$ ./heloo.py
./heloo.py: line 1: syntax error near unexpected token `('
./heloo.py: line 1: `x=raw_input ("enter name: ")'
admin2@admin2-laptop:~/Documents$
Here is the code :
x=raw_input ("enter name: ")
print "helo " + x
raw_input("press<enter>")
Is there something i am doing wrong ? thanks
admin2@admin2-laptop:~$ cd Documents
admin2@admin2-laptop:~/Documents$ chmod +x heloo.py
admin2@admin2-laptop:~/Documents$ ./heloo.py
./heloo.py: line 1: syntax error near unexpected token `('
./heloo.py: line 1: `x=raw_input ("enter name: ")'
admin2@admin2-laptop:~/Documents$
Here is the code :
x=raw_input ("enter name: ")
print "helo " + x
raw_input("press<enter>")
Is there something i am doing wrong ? thanks