Talk:Statistics/Basic: Difference between revisions

→‎Bugs in Python Example: new section with bug list
(→‎Bugs in Python Example: new section with bug list)
Line 78:
:I concur with the style tweaks, and would go so far as to initialize the array with <tt>(0) x 10</tt> instead of using a <tt>map</tt>. I also dislike the original's style of making <tt>for</tt> look like a function call when it's really a keyword, so I'm glad you're fixing that too. --[[User:TimToady|TimToady]] 00:02, 6 March 2012 (UTC)
::I have updated the code - the page now matches closely what I suggested above. Further improvements to style are welcome! [[User:Flies 1|Flies 1]] 22:06, 6 March 2012 (UTC)
 
== Bugs in Python Example ==
 
1. Line 36 prints the value of i that was used in a list comprehension (line 35) not the original value of i in the outer loop, so the printed value (in Python 2.7) is the max value not the number of values, e.g. 10^7
2. Runtime exceeds 2 minutes on a MacBook Pro. Probably not suitable for an example
4

edits