> So, what to do about it? While the Python interactive interpreter is
> mighty powerful, it does have some limitations, and this is one of them.
> You just have to get used to the fact that it is not well-suited for
> editing large blocks of code. It is excellent for trying out small
> snippets, o
On Sat, Nov 23, 2013 at 07:51:59PM +0100, Rafael Knuth wrote:
> > Oh, wait, I see you are using Python 3.0. Don't. Python 3.0 is not
> > supported because it is buggy. You should use 3.1, or better still, 3.3.
> > Python 3.3 is much better than 3.1 or 3.2, and 3.0 is buggy and slow.
>
> What I was
On Sat, Nov 23, 2013 at 08:57:54PM +0100, Rafael Knuth wrote:
> I have only one question left.
> Here's my original program again:
>
> for x in range(2, 10):
> for y in range(2, x):
> if x % y == 0:
> print(x, "equals", y, "*", x//y)
> break
> else:
>
On Sat, Nov 23, 2013 at 09:54:38PM +0100, Rafael Knuth wrote:
> > See? It has no output. By the way, the python REPL is your friend!
> > Use it often when you can't figure out what is happening.
>
> Oh, I didn't even know that such a thing exists :-) Cool!
> Unfortunately, I only found Python REP
On 23/11/13 21:30, Randolph Scott-McLaughlin II wrote:
Inline image 2Inline image 1Hi Tutors,
So I'm writing code for a depth first search where I have 1 start point
and 1 end point. Between those points there are a series of 1-way roads
that goes from one vertex to the next. Sometimes the verte
On Sat, Nov 23, 2013 at 8:30 AM, Rafael Knuth wrote:
> Marc,
>
> great feedback - thank you very much!
> I will bear that in mind for the future.
>
> I modified my program as you suggested, but I received a runtime
> error; I tried to fix that but unfortunately I didn't succeed.
> The modified pro
On 23/11/13 20:54, Rafael Knuth wrote:
See? It has no output. By the way, the python REPL is your friend!
Unfortunately, I only found Python REPLs for version 2.7.2 or lower.
Is there a REPL for 3.3.0 ..?
The REPL (read–eval–print loop) is the >>> prompt.
You type stuff in and Python reads
> See? It has no output. By the way, the python REPL is your friend! Use it
> often when you can't figure out what is happening.
Oh, I didn't even know that such a thing exists :-) Cool!
Unfortunately, I only found Python REPLs for version 2.7.2 or lower.
Is there a REPL for 3.3.0 ..?
Thanks,
R
On Nov 23, 2013, at 2:57 PM, Rafael Knuth wrote:
>
> The output of
>
>for y in range (2,2):
>
> should be ... none - correct?
No, it's not none. It's an empty list; thus, python executes nothing inside the
inner loop.
>>> range(2,2)
[]
>>> for y in range(2,2):
... print 'yes, I m
@Peter
@Steven
@Don
@Danny
thank you *so much" for explaining the concept of a nested for loop!
Your simplified example Steven made it very clear to me:
for x in range(2, 7):
print("outer loop, x =", x)
for y in range(2, x):
print("inner loop, x =", x, "y =", y)
I have only one q
> Oh, wait, I see you are using Python 3.0. Don't. Python 3.0 is not
> supported because it is buggy. You should use 3.1, or better still, 3.3.
> Python 3.3 is much better than 3.1 or 3.2, and 3.0 is buggy and slow.
What I was trying to say is that sometimes I get runtime errors even
if nothing's
On Sat, Nov 23, 2013 at 06:44:43PM +0100, Rafael Knuth wrote:
> Hej there,
>
> I noticed that sometimes when I do lots of modifications within a
> program, I get runtime errors even if the program is "clean". I
> realized that first time when I copy and pasted a program into a new
> window - it mi
Hej there,
I noticed that sometimes when I do lots of modifications within a
program, I get runtime errors even if the program is "clean". I
realized that first time when I copy and pasted a program into a new
window - it miraculously ran without any problems. Although it was
exactly the same prog
; My aim is load the numerical data from this file to a c++ program to
> > process this information.
> >
> > Thanks in advance.
> >
> > -Ruben.
> >
>
> I'm sorry but we don't write code for you here. I suggest that you
> start out by re
On Fri, 11/22/13, Steven D'Aprano wrote:
Subject: Re: [Tutor] Is there a package to "un-mangle" characters?
To: tutor@python.org
Date: Friday, November 22, 2013, 4:30 PM
On Thu, Nov 21, 2013 at 12:04:19PM
-0800, Albert-Jan Roskam wrote:
> Hi,
15 matches
Mail list logo