Re: Python - Caeser Cipher Not Giving Right Output

2014-03-20 Thread Dave Angel
dtran...@gmail.com Wrote in message: > On Thursday, March 20, 2014 11:16:50 PM UTC-4, Dave Angel wrote: >> dtran...@gmail.com Wrote in message: >> > >> >> > def two(c1 , c2): >> >> > c1 = chartonum(c1) >> >> > c2 = chartonum(c2) >> >> > return numtochar(c1 + c2 %26) >> >> >> >>

Re: Python - Caeser Cipher Not Giving Right Output

2014-03-20 Thread Steven D'Aprano
On Thu, 20 Mar 2014 20:23:49 -0700, dtran.ru wrote: > Thanks for your input Dave. Would the line be: > > return numtochar(c1 + c2 %26) Yes, that's the line that Dave is talking about. The critical part is that expression "c1 + c2 %26" which gets calculated before being passed on to numtochar.

Re: Python - Caeser Cipher Not Giving Right Output

2014-03-20 Thread Rustom Mody
On Friday, March 21, 2014 8:53:49 AM UTC+5:30, wrote: > On Thursday, March 20, 2014 11:16:50 PM UTC-4, Dave Angel wrote: > > > Hello good people I am working on a caeser cipher program for class. > > > However, I ran into a problem with my outputs. Up to a certain point for > > > example: > > > 1

Re: Python - Caeser Cipher Not Giving Right Output

2014-03-20 Thread dtran . ru
On Thursday, March 20, 2014 11:58:43 PM UTC-4, Steven D'Aprano wrote: > On Thu, 20 Mar 2014 20:23:49 -0700, dtran.ru wrote: > > > > > Thanks for your input Dave. Would the line be: > > > > > > return numtochar(c1 + c2 %26) > > > > Yes, that's the line that Dave is talking about. > > > >

Re: Question about Source Control

2014-03-20 Thread Cameron Simpson
On 21Mar2014 13:14, Chris Angelico wrote: > On Fri, Mar 21, 2014 at 12:33 PM, Cameron Simpson wrote: > > Regarding having Mercurial installed, that is very easy, and after > > you've gone (eg): > > > > hg clone https://bitbucket.org/cameron_simpson/css > > my-copy-of-cameron's-css > > > > (or

Re: Question about Source Control

2014-03-20 Thread Frank Millman
"Cameron Simpson" wrote in message news:20140321013313.ga58...@cskk.homeip.net... > > Someone intending to clone the project and develop will probably > want the whole repository; as Gregory says - they can then easily > push/pull with others. > > For Frank, the size of the repo is not the size

Re: Question about Source Control

2014-03-20 Thread Chris Angelico
On Fri, Mar 21, 2014 at 4:40 PM, Frank Millman wrote: > To make the software available to anyone who just wants to run a stable > version, copy the working directory of the 'major release' repository to a > directory of its own, without the .hg stuff, and make it available for > download. > > For

Re: running python 2 vs 3

2014-03-20 Thread Marko Rauhamaa
Chris Angelico : > go for the lowest common denominator: > > print("some single string") > > which works happily in all versions of Python. Whenever I have used "print" in my code, it has been with a >> redirection. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: running python 2 vs 3

2014-03-20 Thread Chris Angelico
On Fri, Mar 21, 2014 at 4:49 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> go for the lowest common denominator: >> >> print("some single string") >> >> which works happily in all versions of Python. > > Whenever I have used "print" in my code, it has been with a >> > redirection. Then you're

Re: Question about Source Control

2014-03-20 Thread Cameron Simpson
On 21Mar2014 07:40, Frank Millman wrote: > "Cameron Simpson" wrote in message > news:20140321013313.ga58...@cskk.homeip.net... > > Someone intending to clone the project and develop will probably > > want the whole repository; as Gregory says - they can then easily > > push/pull with others. > >

Re: running python 2 vs 3

2014-03-20 Thread Marko Rauhamaa
Chris Angelico : > Then you're probably not using "sys.stdout.write" but some other file > object's write method. Correct, sys.stderr.write would have been a more accurate choice. > Also, I find it highly unusual that you never use print in its most > basic and intended form. Printing to the st

Re: running python 2 vs 3

2014-03-20 Thread Rustom Mody
On Friday, March 21, 2014 11:38:42 AM UTC+5:30, Marko Rauhamaa wrote: > Chris Angelico : > > Then you're probably not using "sys.stdout.write" but some other file > > object's write method. > Correct, sys.stderr.write would have been a more accurate choice. > > Also, I find it highly unusual tha

<    1   2