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


Groups > comp.lang.python > #57144

Re: converting letters to numbers

X-Received by 10.59.4.176 with SMTP id cf16mr688248ved.10.1382258018878; Sun, 20 Oct 2013 01:33:38 -0700 (PDT)
X-Received by 10.50.109.170 with SMTP id ht10mr123831igb.14.1382258018742; Sun, 20 Oct 2013 01:33:38 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!o2no15286685qas.0!news-out.google.com!9ni50460qaf.0!nntp.google.com!o2no15286684qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Sun, 20 Oct 2013 01:33:38 -0700 (PDT)
In-Reply-To <525b7aec$0$30000$c3e8da3$5496439d@news.astraweb.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=59.95.24.30; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui
NNTP-Posting-Host 59.95.24.30
References <26151b64-4f5e-4ee9-81ac-26679932f43d@googlegroups.com> <mailman.859.1381246619.18130.python-list@python.org> <fb210bab-7ea2-4c70-93e0-7f111d794b72@googlegroups.com> <b2om59pa1npetckqmm66dt16ugkvrv520e@4ax.com> <525b7aec$0$30000$c3e8da3$5496439d@news.astraweb.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <c80db7cd-2a4a-4b46-ab6a-e6d450e239f7@googlegroups.com> (permalink)
Subject Re: converting letters to numbers
From rusi <rustompmody@gmail.com>
Injection-Date Sun, 20 Oct 2013 08:33:38 +0000
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding quoted-printable
X-Received-Bytes 1984
Xref csiph.com comp.lang.python:57144

Show key headers only | View raw


On Monday, October 14, 2013 10:32:36 AM UTC+5:30, Steven D'Aprano wrote:
> On Sun, 13 Oct 2013 20:13:32 -0700, Tim Roberts wrote:
> 
> > def add(c1, c2):
> >      % Decode
> >      c1 = ord(c1) - 65
> >      c2 = ord(c2) - 65
> >      % Process
> >      i1 = (c1 + c2) % 26
> >      % Encode
> >      return chr(i1+65)
> 
> Python uses # for comments, not %, as I'm sure you know. What language 
> were you thinking off when you wrote the above?


Maybe Tim was putting in the percentage of CPU cycles (wetware cycles??) on Decode, Process and Encode. So we have the % but not the percent…

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


Thread

converting letters to numbers kjakupak@gmail.com - 2013-10-08 07:28 -0700
  Re: converting letters to numbers Robert Day <robertkday@gmail.com> - 2013-10-08 15:47 +0100
    Re: converting letters to numbers kjakupak@gmail.com - 2013-10-08 07:51 -0700
      Re: converting letters to numbers Joel Goldstick <joel.goldstick@gmail.com> - 2013-10-08 11:01 -0400
  Re: converting letters to numbers random832@fastmail.us - 2013-10-08 11:36 -0400
    Re: converting letters to numbers kjakupak@gmail.com - 2013-10-08 08:44 -0700
      Re: converting letters to numbers random832@fastmail.us - 2013-10-08 11:58 -0400
      Re: converting letters to numbers Tim Roberts <timr@probo.com> - 2013-10-13 20:13 -0700
        Re: converting letters to numbers Steven D'Aprano <steve@pearwood.info> - 2013-10-14 05:02 +0000
          Re: converting letters to numbers Charles Hixson <charleshixsn@earthlink.net> - 2013-10-16 12:18 -0700
            Re: converting letters to numbers Piet van Oostrum <piet@vanoostrum.org> - 2013-10-16 16:25 -0400
          Re: converting letters to numbers Rotwang <sg552@hotmail.co.uk> - 2013-10-16 23:39 +0100
            Re: converting letters to numbers MRAB <python@mrabarnett.plus.com> - 2013-10-16 23:53 +0100
            Re: converting letters to numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-17 01:21 +0100
          Re: converting letters to numbers Tim Roberts <timr@probo.com> - 2013-10-19 16:31 -0700
          Re: converting letters to numbers rusi <rustompmody@gmail.com> - 2013-10-20 01:33 -0700
  Re: converting letters to numbers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-08 17:05 +0100
  Re: converting letters to numbers Dave Angel <davea@davea.name> - 2013-10-08 21:24 +0000

csiph-web