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


Groups > comp.lang.python > #68777

Re: Python - Caeser Cipher Not Giving Right Output

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 <ian.g.kelly@gmail.com>
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; '&gt;': 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 <lggdbi$ku6$1@ger.gmane.org>
References <7eee0f2b-0d5f-409e-ae4e-8c9c1af31d74@googlegroups.com> <mailman.8341.1395371543.18130.python-list@python.org> <bda05813-d186-41ea-a40d-5d36f90a8fed@googlegroups.com> <lggdbi$ku6$1@ger.gmane.org>
Date Sat, 22 Mar 2014 08:22:28 -0600
Subject Re: Python - Caeser Cipher Not Giving Right Output
From Ian Kelly <ian.g.kelly@gmail.com>
To Python <python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8400.1395498157.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mar 20, 2014 9:59 PM, "Dave Angel" <davea@davea.name> 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.

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


Thread

Python - Caeser Cipher Not Giving Right Output dtran.ru@gmail.com - 2014-03-20 19:50 -0700
  Re:Python - Caeser Cipher Not Giving Right Output Dave Angel <davea@davea.name> - 2014-03-20 23:16 -0400
    Re: Python - Caeser Cipher Not Giving Right Output dtran.ru@gmail.com - 2014-03-20 20:23 -0700
      Re: Python - Caeser Cipher Not Giving Right Output Dave Angel <davea@davea.name> - 2014-03-21 00:02 -0400
      Re: Python - Caeser Cipher Not Giving Right Output Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-21 03:58 +0000
        Re: Python - Caeser Cipher Not Giving Right Output dtran.ru@gmail.com - 2014-03-20 21:23 -0700
          Re: Python - Caeser Cipher Not Giving Right Output Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-21 09:50 +0000
      Re: Python - Caeser Cipher Not Giving Right Output Rustom Mody <rustompmody@gmail.com> - 2014-03-20 21:02 -0700
      Re: Python - Caeser Cipher Not Giving Right Output Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-22 08:22 -0600
        Re: Python - Caeser Cipher Not Giving Right Output Rustom Mody <rustompmody@gmail.com> - 2014-03-22 10:29 -0700

csiph-web