"Edwin Boyette" wrote
Don't try to make interactive programming something its not.
It's handy if you have something short to try out, want to
evaluate a function at some value etc.
Don't rage at the hammer for not being an allen wrench
But in this case it is a valid complaint. Almost every
e:
From: Kent Johnson
Subject: Re: [Tutor] Interactive programming.
To: "WM."
Cc: "Sander Sweers" , tutor@python.org
Date: Wednesday, January 7, 2009, 5:38 PM
-Inline Attachment Follows-
On Wed, Jan 7, 2009 at 5:36 PM, WM. wrote:
> IDLE 2.6
>>>&
On Wed, Jan 7, 2009 at 5:36 PM, WM. wrote:
> IDLE 2.6
i = 1
if i > 1:
>print 'x'
> else:
>print 'y'
>
>
> y
> Last post on this topic, I guess.
> I think that the script looks pretty lame, though.
It was always lame :-) but you got it to work...
Kent
__
On Wed, Jan 7, 2009 at 4:45 PM, WM. wrote:
> Norman Khine wrote:
>>
>> >>> i = 5
>> >>> j = 7
>> >>> if i <= j:
>> ... print 'nudge', 'nudge'
>> ... else:
>> ... print 'whatever'
>> ...
>> nudge nudge
>
> The above is just what the tutorials said would happen.
> Can anyone give me a ste
IDLE 2.6
>>> i = 1
>>> if i > 1:
print 'x'
else:
print 'y'
y
>>>
Last post on this topic, I guess.
I think that the script looks pretty lame, though.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinf
On Wed, Jan 7, 2009 at 22:45, WM. wrote:
> Norman Khine wrote:
>>
>> >>> i = 5
>> >>> j = 7
>> >>> if i <= j:
>> ... print 'nudge', 'nudge'
>> ... else:
>> ... print 'whatever'
>> ...
>> nudge nudge
>
> The above is just what the tutorials said would happen.
> Can anyone give me a step-
Norman Khine wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
... print 'nudge', 'nudge'
... else:
... print 'whatever'
...
nudge nudge
The above is just what the tutorials said would happen.
Can anyone give me a step-by-step in IDLE 2.6 that would make this happen?
__
--- On Wed, 1/7/09, WM. wrote:
From: WM.
Subject: Re: [Tutor] Interactive programming.
To: "A.T.Hofkamp"
Cc: tutor@python.org
Date: Wednesday, January 7, 2009, 11:46 AM
IDLE 2.6
>>> i = 1
>>> j = 11
>>> if j > 1:
print j
else:
On Wed, Jan 7, 2009 at 11:46 AM, WM. wrote:
> IDLE 2.6
i = 1
j = 11
if j > 1:
>print j
>else:
>
> SyntaxError: invalid syntax
>
> I am getting a little dizzy here.
>
> I know about text editor, code, save, F5.
>
> Many tutorials say that it is funner and faster
IDLE 2.6
>>> i = 1
>>> j = 11
>>> if j > 1:
print j
else:
SyntaxError: invalid syntax
>>>
I am getting a little dizzy here.
I know about text editor, code, save, F5.
Many tutorials say that it is funner and faster to test an idea
'interactively', using IDLE.
Kent Johnson wrote:
On Wed, Jan 7, 2009 at 5:28 AM, A.T.Hofkamp wrote:
WM. wrote:
Norman Khine wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
... print 'nudge', 'nudge'
... else:
... print 'whatever'
...
nudge nudge
>>>
Yes, I understand how your program works. What I do not understa
On Wed, Jan 7, 2009 at 5:28 AM, A.T.Hofkamp wrote:
> WM. wrote:
>>
>> Norman Khine wrote:
>>>
>>> >>> i = 5
>>> >>> j = 7
>>> >>> if i <= j:
>>> ... print 'nudge', 'nudge'
>>> ... else:
>>> ... print 'whatever'
>>> ...
>>> nudge nudge
>>> >>>
>
>> Yes, I understand how your program wor
WM. wrote:
Norman Khine wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
... print 'nudge', 'nudge'
... else:
... print 'whatever'
...
nudge nudge
>>>
Yes, I understand how your program works. What I do not understand is
how you got it. My program came out in IDLE as you see it. No ..
Norman Khine wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
... print 'nudge', 'nudge'
... else:
... print 'whatever'
...
nudge nudge
>>>
WM. wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
print 'nudge, nudge'
else:
File "", line 3
else:
^
IndentationError: u
On Tue, Jan 6, 2009 at 20:12, WM. wrote:
i = 5
j = 7
if i <= j:
>print 'nudge, nudge'
> else:
>
> File "", line 3
>else:
> ^
> IndentationError: unexpected indent
Python uses indentation to seperate code blocks and will throw an
error if it finds inconsistan
"WM." wrote
>>> i = 5
>>> j = 7
>>> if i <= j:
print 'nudge, nudge'
else:
File "", line 3
else:
^
IndentationError: unexpected indent
Running in IDLE, all is well until "else:". IDLE seems perplexed
This is, in my view, a long standing bug in IDLE. It doesn't show
indent
>>> i = 5
>>> j = 7
>>> if i <= j:
... print 'nudge', 'nudge'
... else:
... print 'whatever'
...
nudge nudge
>>>
WM. wrote:
>>> i = 5
>>> j = 7
>>> if i <= j:
print 'nudge, nudge'
else:
File "", line 3
else:
^
IndentationError: unexpected indent
Runni
17 matches
Mail list logo