Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Ian Kelly
On Sat, Dec 8, 2018 at 7:57 PM wrote: > > Grant Edwards於 2018年12月9日星期日 UTC+8上午12時52分04秒寫道: > > Just to be clear: you do _not_ want to use eval on the string. > > > > If you're not the one who created the string, it might wipe your hard > > drive or empty your bank account. If you _are_ the one wh

Re: conda/anaconda and pip3 (pip)

2018-12-08 Thread Monte Milanuk
Did you find any solution(s)? -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread jfong
Avi Gross於 2018年12月9日星期日 UTC+8上午1時40分26秒寫道: > Jach, > > Just for fun, I looked at the puzzle you asked about and solved it several > ways without running into your 03 problem at all. There are more efficient > solutions than total brute force. > > Anyone not interested, stop here, please. After

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread jfong
Grant Edwards於 2018年12月9日星期日 UTC+8上午12時52分04秒寫道: > On 2018-12-08, Cameron Simpson wrote: > > On 07Dec2018 20:24, Jach Fong wrote: > >>Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: > >>> What is it exactly that you're trying to accomplish with this? Perhaps > >>> there's a better way than using eval. >

Re: Program to keep track of success percentage

2018-12-08 Thread Tim Chase
On 2018-12-08 17:54, Avi Gross wrote: > This may be a bit awkward. ICWYDT. "awk"ward. :wide-eyed_gaping_grin_with_finger-guns: You seem to have your knickers in a knot. > Your solution in AWK assumes lots of things. You assume the data > is either on stdin or comes from automatically opening fi

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Richard Damon
On 12/8/18 6:23 PM, Avi Gross wrote: > [DISCLAIMER: less about python than analysis of a puzzle] > > Richard, > > Thank you for pointing out that c in the puzzle is constrained. That > explains why my 320 answers are too many. It cannot be 0 as "a" is always > zero and it cannot be the three other

RE: Why Python don't accept 03 as a number?

2018-12-08 Thread Avi Gross
[DISCLAIMER: less about python than analysis of a puzzle] Richard, Thank you for pointing out that c in the puzzle is constrained. That explains why my 320 answers are too many. It cannot be 0 as "a" is always zero and it cannot be the three other values that b,d,e are using at the time. So my ea

RE: Program to keep track of success percentage

2018-12-08 Thread Avi Gross
Tim, This may be a bit awkward. I am not sure a question on the python list expects to get a one-liner, let alone in an unrelated language like AWK. Unless you install other environments like Cygwin, AWK does not tend to be available of platforms like Windows. Ditto for PERL and other language

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Richard Damon
On 12/8/18 12:40 PM, Avi Gross wrote: > You are solving for: ab + aa + cd == ce Actually, an even quicker analysis for this particular problem is: from the 10s digits, a + a + c + carryin = c Thus a and carryin must both be 0 (carryin can not be negative, nor any of the variables) thus the final

Re: Program to keep track of success percentage

2018-12-08 Thread Tim Chase
On 2018-12-08 10:02, Musatov wrote: > I am thinking about a program where the only user input is > win/loss. The program let's you know if you have won more than 31% > of the time or not. Any suggestions about how to approach authoring > such a program? Thanks. -- Can be done with an awk one-liner

Re: Program to keep track of success percentage

2018-12-08 Thread Ian Kelly
On Sat, Dec 8, 2018 at 1:22 PM Alister via Python-list wrote: > > On Sat, 08 Dec 2018 10:02:41 -0800, Musatov wrote: > > > I am thinking about a program where the only user input is win/loss. The > > program let's you know if you have won more than 31% of the time or not. > > Any suggestions about

Program to keep track of success percentage

2018-12-08 Thread Musatov
I am thinking about a program where the only user input is win/loss. The program let's you know if you have won more than 31% of the time or not. Any suggestions about how to approach authoring such a program? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Program to keep track of success percentage

2018-12-08 Thread Alister via Python-list
On Sat, 08 Dec 2018 10:02:41 -0800, Musatov wrote: > I am thinking about a program where the only user input is win/loss. The > program let's you know if you have won more than 31% of the time or not. > Any suggestions about how to approach authoring such a program? Thanks. To start describe how

RE: Why Python don't accept 03 as a number?

2018-12-08 Thread Avi Gross
Jach, Just for fun, I looked at the puzzle you asked about and solved it several ways without running into your 03 problem at all. There are more efficient solutions than total brute force. Anyone not interested, stop here, please. After my explanations, I show a python program then the output i

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Grant Edwards
On 2018-12-08, Cameron Simpson wrote: > On 07Dec2018 20:24, Jach Fong wrote: >>Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: >>> What is it exactly that you're trying to accomplish with this? Perhaps >>> there's a better way than using eval. >> >>This problem comes from solving a word puzzle, >>ab

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Richard Damon
On 12/7/18 11:24 PM, jf...@ms4.hinet.net wrote: > Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: >> What is it exactly that you're trying to accomplish with this? Perhaps >> there's a better way than using eval. > This problem comes from solving a word puzzle, > ab + aa + cd == ce > Each character wi

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread jfong
Avi Gross at 2018/12/8 UTC+8 PM2:09:20 wrote: > [[READERS DIGEST CONDENSED ANSWER: use int("string") ]] > > Since we all agree python will not make notations like "05" work > indefinitely, and the need expressed is how to solve a symbolic puzzle (see > message below) then it makes sense to look at

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Serhiy Storchaka
08.12.18 08:53, Henrik Bengtsson пише: A comment from the sideline: one could imagine extending the Python syntax with a (optional) 0d prefix that allows for explicit specification of decimal values. They would "complete" the family: * 0b: binary number * 0o: octal number * 0d: decimal number *

Re: Why Python don't accept 03 as a number?

2018-12-08 Thread Ian Kelly
On Fri, Dec 7, 2018 at 11:56 PM Henrik Bengtsson wrote: > > A comment from the sideline: one could imagine extending the Python syntax > with a (optional) 0d prefix that allows for explicit specification of > decimal values. They would "complete" the family: > > * 0b: binary number > * 0o: octal n