Re: [Tutor] If statement The Python Tutorial 3.4.1

2014-09-14 Thread Alan Gauld
On 14/09/14 09:00, ALAN GAULD wrote: So, to IDLE, your code looks like if x < 0: print(...) elif x == 0: Web mail screwed things up. That should be: > if x < 0: >print(...) > elif x == 0: To fix it you need to make it look like this on screen: if x < 0:

Re: [Tutor] If statement The Python Tutorial 3.4.1

2014-09-14 Thread ALAN GAULD
n Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos > > From: Gregory Donaldson >To: Alan Gauld >Sent: Sunday, 14 September 2014, 4:28 >Subject: Re: [Tutor] If statement The Python

Re: [Tutor] If statement The Python Tutorial 3.4.1

2014-09-06 Thread Alan Gauld
On 06/09/14 00:29, Gregory Donaldson wrote: This is what it looks like when I try to get it to work. x = int(input("Please enter an integer: ")) Please enter an integer: 42 if x < 0: x = 0 print('Negative changed to zero') I'm guessing that you actually indented the two lines above bu

Re: [Tutor] If statement The Python Tutorial 3.4.1

2014-09-06 Thread Joel Goldstick
On Fri, Sep 5, 2014 at 7:29 PM, Gregory Donaldson wrote: > I've tried to copy this example from the Tutorial into the Python Idle, but > it doesn't seem to recognize it. > > 4.1. if Statements¶ > > Perhaps the most well-known statement type is the if statement. For example: > > x = int(i

[Tutor] If statement The Python Tutorial 3.4.1

2014-09-06 Thread Gregory Donaldson
I've tried to copy this example from the Tutorial into the Python Idle, but it doesn't seem to recognize it. 4.1. if Statements¶ Perhaps the most well-known statement