Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'cpython': 0.05; 'string.': 0.05; 'assign': 0.07; 'detect': 0.07; 'assigning': 0.09; 'escape': 0.09; 'get.': 0.09; 'integers': 0.09; 'subject:string': 0.09; 'subject:while': 0.09; 'times,': 0.14; 'windows': 0.15; 'highlight': 0.16; 'ides': 0.16; 'immutable;': 0.16; 'integer,': 0.16; 'parentheses': 0.16; 'subject:literal': 0.16; 'subject:scanning': 0.16; 'traceback.': 0.16; 'tuple': 0.16; 'wrote:': 0.18; 'appears': 0.22; 'input': 0.22; 'header:User- Agent:1': 0.23; 'integer': 0.24; 'looks': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'errors': 0.30; 'but': 0.35; 'received:google.com': 0.35; 'easily': 0.37; 'message- id:@gmail.com': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'helps': 0.61; 'full': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'such': 0.63; 'here': 0.66; 'experience.': 0.67; 'anything.': 0.68; 'prompt': 0.68; 'obvious': 0.74; '9.1': 0.84; 'freebsd': 0.84; 'laid': 0.84; 'obvious.': 0.84; 'shadow': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=jIl7sdSxB+pkeax+p4VoTtR0V48Ya0Tfz/ifJBihyPM=; b=XgcBqMAjLtgQATX+LRbnmzRUBWCnAmZLi66EbsO0s/mfLUW1rulZO2xsFKlOjkSU83 9D2sIue9terkfXq8CGUZy36w/4D3Bu+nuuXNXUPSorEA4n4ivzFuv5ZKG3llhYZb7qLZ bnm0qGCUwirEY+ptOzq8R7oQqs6Z2+nngiLqKeCLpsUuInkH61K68zdE/erGqUMWjPuP 4FHVgAPaj4kkOCXTR2trOa2u4xkp6X5GWZCfneXJRJDQuBs+FeezSXAKVBW4OSp997Bf AILqsN+AulAaeqg3wFHoGPWSW2kaJugDQhAZ0BklMKYc7+sF8kjuDQDUmpS8wa20T/A5 8xFg== X-Received: by 10.42.36.198 with SMTP id v6mr591283icd.58.1372199745571; Tue, 25 Jun 2013 15:35:45 -0700 (PDT) Date: Tue, 25 Jun 2013 17:35:11 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: newbie EOL while scanning string literal References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372199747 news.xs4all.nl 15864 [2001:888:2000:d::a6]:36059 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49200 On 2013.06.25 17:19, willlewis965@gmail.com wrote: > na=('type first integer n\')##THE RED SHADOW APPEARS HERE## Here you escape the closing single quote. \n is a line feed, not n\. Also, the parentheses are unnecessary, and it looks like you are a assigning a tuple instead of a string. Syntax errors are often the result of typos; IDEs can easily detect such problems and will highlight them for you to make them obvious. > int(naa) Strings are immutable; this returns an integer, but you don't assign it to anything. > is_triangle(na,ne,ni) And here, you pass the strings you assigned for the input prompt instead of the integers you wanted to get. BTW, if you have an error, it helps if you copy/paste the full traceback. Many times, the exact issue is laid out in the traceback, and the solution is obvious to those with experience. -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1