Re: [Tutor] Noob: nested if-clauses

2016-01-30 Thread Alan Gauld
On 30/01/16 01:06, Alan Gauld wrote: > or CD to the folder: > > C:\SOME\PATH> CD D:\mycode\abc > D: > D:\mycode\abc> Oops, that sequence should be: C:\SOME\PATH> CD D:\mycode\abc C:\SOME\PATH> D: D:\mycode\abc> sorry about that. -- Alan G Author of the Learn to Program web site http://www.

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread Alan Gauld
On 29/01/16 17:41, STF wrote: > what that gives. IDLE is indeed easier to use than the "DOS-style" Python > command-line window. One thing I'd say is that you can tweak the DOS CMD window quite a lot to make it better for IDLE(and other interpreters). But IDLE is probably still better for most

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread John Wong
On Fri, Jan 29, 2016 at 3:13 PM, Alan Gauld wrote: > > When I first heard that python was white-space sensitive I > thought, oh no! But now I see it as a huge strength of the > language. Once you get used to it you will find it helps > far more than it hinders - just avoid tabs and/or map your >

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread boB Stepp
On Fri, Jan 29, 2016 at 11:41 AM, STF wrote: > ...How do you call this thing, BTW? I'm unable to > understand how to navigate inside this thing. I mean, when I open it, in > which folder am I in? Suppose I have a Python file in > D:\mycode\abc\myfile.py. How to run it? IDLE presents itself i

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread STF
On 25 January 2016 at 21:46, Alan Gauld wrote: > On 25/01/16 15:52, STF wrote: > > > It's a total fluke. I put the indentation like this to *visually* help > > myself understand what I was going to write. > > That's one of the good things about Python, if it looks right > it very often is right.

Re: [Tutor] Noob: nested if-clauses

2016-01-29 Thread Alan Gauld
On 29/01/16 17:41, STF wrote: > Personally, I don't find this as a "good thing". It rather recalls the > horrible dreams I have had when I was using Fortran! In Fortran, we have > to deal with position of first characters to make things work. IMO, making > a visual format an essential thing in

Re: [Tutor] Noob: nested if-clauses

2016-01-25 Thread Alan Gauld
On 25/01/16 15:52, STF wrote: > It's a total fluke. I put the indentation like this to *visually* help > myself understand what I was going to write. That's one of the good things about Python, if it looks right it very often is right. > In the Python tutorial that I was using, the author only

Re: [Tutor] Noob: nested if-clauses

2016-01-25 Thread Danny Yoo
> if condition_C: > instruction_10 >instruction_11 > instruction_12 > > There are 4 spaces in front of instruction_10, 3 spaces in front of > instruction_11 and 5 spaces in front of instruction_12. > > What would happen to instruction_11 and instruction_12? Would Python > ignore

Re: [Tutor] Noob: nested if-clauses

2016-01-25 Thread STF
Thanks to Joel and Alan for replying. On 24 January 2016 at 22:08, Alan Gauld wrote: > On 24/01/16 19:42, STF wrote: > > > Let's see the following instructions: > > > > if condition_A: > > instruction_1 > > instruction_2 > > if condition_B: > > instruction_3 > >

Re: [Tutor] Noob: nested if-clauses

2016-01-24 Thread Alan Gauld
On 24/01/16 19:42, STF wrote: > Let's see the following instructions: > > if condition_A: > instruction_1 > instruction_2 > if condition_B: > instruction_3 > instruction_4 > instruction_5 > else: > instruction_6 > > > * How to make Pythom understa

Re: [Tutor] Noob: nested if-clauses

2016-01-24 Thread Joel Goldstick
On Sun, Jan 24, 2016 at 2:42 PM, STF wrote: > Hi, > > I've just started to learn Python thru some online courses and websites. > They just teach very basic things. I've got some questions about "if" that > I'm unable to find the answers. So let me ask the newbie questions here. > > Let's see th