Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; 'happen?': 0.09; 'modulo': 0.09; 'wrote': 0.14; 'ah,': 0.16; 'did.': 0.16; 'equation.': 0.16; 'parentheses': 0.16; 'subject:Not': 0.16; 'traceback.': 0.16; 'tried:': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'math': 0.24; '>': 0.26; 'header :In-Reply-To:1': 0.27; 'wondering': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'fault': 0.31; 'case,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'error.': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'matter': 0.61; 'email addr:gmail.com': 0.63; 'mar': 0.68; '20,': 0.68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lsUlKKUTUYlZIzDIeHgAMee+ajdSGhzoI+IpMFSqDmI=; b=QhzuN9c1zGNp7AJdTJp8JD+pwtfVAEVACGEjqVgYbrUeHCntafZec0lvXr0u+Me6EY 3boqNDr2VEPzrCG3utZ86PXs7Zw96i4t/QEAmsV1iOfLeSETXyw7JX1HdytOb1hKa3R+ az4YsV5+b/uR0/jJ3Qn8olz8f/3o6AEEHqxtLgJkdGwwLv9ZKnDFhDhPnhZN2e6PMwgM kJOHW0t/jBjy7rFY9/xdbmFxyOdUzYVeyTCntjQqaiF+1UagiuOUSlg5dq50fSlhUHug Yzko84aZitOBkE2elvSCbJLzSkDfjxRmS4BJMAwKNGlQ0TlRMaA1BEiBzgF+1VBcKpPD tOng== MIME-Version: 1.0 X-Received: by 10.67.13.134 with SMTP id ey6mr60829406pad.44.1395498148423; Sat, 22 Mar 2014 07:22:28 -0700 (PDT) In-Reply-To: References: <7eee0f2b-0d5f-409e-ae4e-8c9c1af31d74@googlegroups.com> Date: Sat, 22 Mar 2014 08:22:28 -0600 Subject: Re: Python - Caeser Cipher Not Giving Right Output From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=e89a8ffbacb16bedc504f532bb08 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395498157 news.xs4all.nl 2944 [2001:888:2000:d::a6]:48984 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68777 --e89a8ffbacb16bedc504f532bb08 Content-Type: text/plain; charset=ISO-8859-1 On Mar 20, 2014 9:59 PM, "Dave Angel" wrote: > > dtran.ru@gmail.com Wrote in message: > > And I was wondering how I would add the partenthesis because I tried: > > > > return numtochar(c1 + c2 (%26)) and it gave me an error. > > Please help us to help you by actually showing the traceback. > Doesn't matter in this case, but... > > What order do you want the add and the modulo to happen? Use the > parentheses to say so. Ah, but he did. x = y + z (mod m) is a perfectly well-formed math equation. Not the OP's fault if it doesn't work that way in Python. --e89a8ffbacb16bedc504f532bb08 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Mar 20, 2014 9:59 PM, "Dave Angel" <davea@davea.name> wrote:
>
> =A0dtran.ru@gmail.com Wrote = in message:
> > And I was wondering how I would add the partenthesis because I tr= ied:
> >
> > return numtochar(c1 + c2 (%26)) and it gave me an error.
>
> Please help us to help you by actually showing the traceback.
> =A0Doesn't matter in this case, but...
>
> What order do you want the add and the modulo to happen? =A0Use the > =A0parentheses to say so.

Ah, but he did. x =3D y + z (mod m) is a perfectly well-form= ed math equation. Not the OP's fault if it doesn't work that way in= Python.

--e89a8ffbacb16bedc504f532bb08--