Re: How do Fractions convert to int?

2018-03-13 Thread Robin Koch
/] -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Appending data to a json file

2017-04-04 Thread Robin Koch
appending. But maybe you take a look at YAML (if it's appropriate for your project). -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: How to sort this without 'cmp=' in python 3?

2016-10-14 Thread Robin Koch
/functools.html#functools.cmp_to_key | Transform an old-style comparison function to a key function. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: cropping a random part of an image

2016-08-09 Thread Robin Koch
nd)".format(numOfImages/t)) print("({:.1f} tiles per second)".format(tilesPerImage*numOfImages/t)) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Python PygLatin

2016-05-09 Thread Robin Koch
aborate your knowledge about conditional probability as well. P("X is programmer" | "X is in Forbes Top 10") != P("X is in Forbes Top 10" | "X is programmer") -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Stop writing Python 4 incompatible code

2016-01-15 Thread Robin Koch
ee TeX. :-) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way importing a string object?

2016-01-05 Thread Robin Koch
e, read likes a part of the body. I am bad on composition. Even after your reminder, I still can't think of a better one:-( I think the subject is fine. But you should have extended your message body a little so your question is understandable without reading the subject. -- Robin Koch -- https://mai

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
cedure in my other answer.) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: On 02/01/16 16:57, Robin Koch wrote: sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) But did you actually test it? Yes, should work for n >= 1. Why do you ask? -- Robin Koch -- https://mail.python.org/mailman/listinfo/pyt

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
! contains 24 factors 5 and even more factors 2. So 100! contains 24 facotrs 10 and therefore has 24 trailing zeros. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Trailing zeros of 100!

2016-01-02 Thread Robin Koch
Am 02.01.2016 um 22:57 schrieb Chris Angelico: On Sun, Jan 3, 2016 at 3:56 AM, Robin Koch <robin.k...@t-online.de> wrote: Am 02.01.2016 um 17:09 schrieb Tony van der Hoff: On 02/01/16 16:57, Robin Koch wrote: sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)]) But did you ac

Re: geostationary satellite data

2015-12-16 Thread Robin Koch
at have been scaled to fit into 1-byte by subtracting | "75" from each datum. Therefore it is necessary for the user to add a | value of "75" to each data value when using the data. HTH a little, -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variable assigning problems...

2015-12-11 Thread Robin Koch
execution from right to left is also a good choice, because one would like to do something like: x = y = z = 0 Again, assigning from left to right woud lead to errors. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variable assigning problems...

2015-12-11 Thread Robin Koch
Am 11.12.2015 um 17:39 schrieb Ian Kelly: On Fri, Dec 11, 2015 at 9:24 AM, Robin Koch <robin.k...@t-online.de> wrote: Assigning goes from right to left: x,y=y,x=2,3 <=> y, x = 2, 3 x, y = y, x Otherwise the assignment x, y = y, x would not make any sense, since x and y haven'

Re: Help on for loop understanding

2015-12-07 Thread Robin Koch
hod in Python 3.x) of the iterator -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: increment/decrement operators

2015-12-05 Thread Robin Koch
answer: x += y works. (Well, it should.) x++ doesn't. Long answer: I'm sure someone more experienced will come up with one shortly. :-) Until then I found this: http://stackoverflow.com/a/1485854 -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch <robin.k...@t-online.de> wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? That would be the normal way to write i

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
o use the *string* module without importing it, I'd guess. Try: import string first then you should be able to access string.join without error. Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:23 schrieb Terry Reedy: On 12/3/2015 11:00 AM, Robin Koch wrote: Am 03.12.2015 um 10:02 schrieb Gary Herron: On 12/02/2015 10:55 PM, Robert wrote: Hi, I read the tutorial on "Why is join() a string method instead of a list or tuple method?" at l

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:42 schrieb Mark Lawrence: On 03/12/2015 17:01, Robin Koch wrote: Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch <robin.k...@t-online.de> wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8',

Re: Regular expressions

2015-11-03 Thread Robin Koch
Am 03.11.2015 um 05:23 schrieb ru...@yahoo.com: Of course there are people who misuse regexes. /^1?$|^(11+?)\1+$/ There are? 0:-) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: GoPiGo script

2015-11-02 Thread Robin Koch
only the first 5 lines. So those (and only those) are repeated. The next line ("if mindist > us_dist(15):") wasn't intended and therefore *not* repeated. If you just learning programming with Python you migth want to start with smaller examples to understand the syntax better. Do you understand what the script is supposed to do in every line? -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: GoPiGo script

2015-11-02 Thread Robin Koch
does understand what I meant. Intend means something entirely different, and is not a Python term. Yes, I know the difference. I just didn't pay enough attention to it. Ironically enough I wrote actually another post about Android-intends earlier. -- Robin Koch -- https://mail.python.org

Re: Casting to a number (both int and float)?

2015-08-28 Thread Robin Koch
. -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list

Re: How to rearrange array using Python?

2015-07-30 Thread Robin Koch
to takeinto account. :-)) -- Robin Koch -- https://mail.python.org/mailman/listinfo/python-list