Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49193

newbie EOL while scanning string literal

Newsgroups comp.lang.python
Date 2013-06-25 15:19 -0700
Message-ID <da2378bb-e76b-4720-8071-784c717a8c38@googlegroups.com> (permalink)
Subject newbie EOL while scanning string literal
From willlewis965@gmail.com

Show all headers | View raw


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)

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 15:19 -0700
  Re: newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 15:25 -0700
  Re: newbie EOL while scanning string literal Andrew Berg <robotsondrugs@gmail.com> - 2013-06-25 17:35 -0500
  Re: newbie EOL while scanning string literal rurpy@yahoo.com - 2013-06-25 15:37 -0700
  Re: newbie EOL while scanning string literal rurpy@yahoo.com - 2013-06-25 16:44 -0700
    Re: newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 17:05 -0700
      Re: newbie EOL while scanning string literal rusi <rustompmody@gmail.com> - 2013-06-25 20:38 -0700
      Re: newbie EOL while scanning string literal Larry Hudson <orgnut@yahoo.com> - 2013-06-25 21:47 -0700
      Re: newbie EOL while scanning string literal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-26 08:31 +0000

csiph-web