newbie EOL while scanning string literal

willlewis965 at gmail.com willlewis965 at gmail.com
Tue Jun 25 18:19:43 EDT 2013


I'am starting to learn python reading a book and I have to do some exercises but I can't understand this one, when I run it it says EOL while scanning string literal and a red shadow next to a  line of code.

I'm trying to get input from user. I have 3 questions:

- Whats does EOL mean and in what circumstances can I face it again and how to avoid it.

- Is this code correct or just looks silly, I am a newbie in programming how can I write this code better OR is it just not right 'specify'.

- in how many ways can I specify the input has to be an integer, do I have to specify one by one or can I do something to get all input converted to integers in one step.

THANKS.

 I AM USING  PYTHON 3.3.2

def is_triangle(a,b,c):
        if a+b<=c :
            print('it is a triaNgle')
        else:
            print('no')

is_triangle(5,4,3)


na=('type first integer n\')##THE RED SHADOW APPEARS HERE##
    naa=input(na)
    int(naa)
ne=('type second integer n\')
    nee=input(ne)
    int(nee)
ni=('type third integer \n')
    nii=input(ni)
    int(nii)

is_triangle(na,ne,ni)




More information about the Python-list mailing list