Re: [Tutor] Extremely simple question

2012-01-11 Thread Steven D'Aprano
Noah Hall wrote: On Wed, Jan 11, 2012 at 7:14 AM, Chris Johnson c.johnso...@gmail.com wrote: Hi there, I am *new* (I cannot put enough emphasis on that!) to Python programming, and to programming in general. I am trying to write out a statement that will protect a file on my computer from

Re: [Tutor] Extremely simple question

2012-01-11 Thread Noah Hall
On Wed, Jan 11, 2012 at 10:24 AM, Steven D'Aprano st...@pearwood.info wrote: Noah Hall wrote: On Wed, Jan 11, 2012 at 7:14 AM, Chris Johnson c.johnso...@gmail.com wrote: Hi there, I am *new* (I cannot put enough emphasis on that!) to Python programming, and to programming in general. I am

Re: [Tutor] Extremely simple question

2012-01-11 Thread col speed
your_weight = int(raw_input(Please enter your weight: )) if your_weight 0: print 'You're not Chris!' elif your_weight == 170: print 'You might be Chris! But...' your_height = int(raw_input(Please enter your height: )) if your_height 180: print 'You're not Chris! elif your_height ==

[Tutor] Extremely simple question

2012-01-11 Thread Mike G
Hi Chris I'm new to programming and Python myself so I would listen to the previous guys first, and I'll repeat a bit of what has already been mentioned... Make sure you define 'x'. Is name really an 'int', or is it possibly a 'str'? Fix any indentation issues. Is there anything you can do

Re: [Tutor] Extremely simple question

2012-01-11 Thread Max S.
I believe that line 3 raises an error. The because you contained the text in single quotes, and then used the same character in 'you're not chris', Python believes that you are trying to type you re not chris. You can change the single quotes surrounding your string to double quotes (you're not

Re: [Tutor] Extremely simple question

2012-01-11 Thread col speed
On 11 January 2012 20:11, Max S. maxskywalk...@gmail.com wrote: I believe that line 3 raises an error.  The because you contained the text in single quotes, and then used the same character in 'you're not chris', Python believes that you are trying to type you re not chris.  You can change the

Re: [Tutor] Extremely simple question

2012-01-11 Thread Adam Stogner
You should be using double quotes on this line and you are missing the last quote: print 'You're not Chris! Should be: print You're not Chris! On Wed, Jan 11, 2012 at 8:17 AM, col speed ajarnco...@gmail.com wrote: On 11 January 2012 20:11, Max S. maxskywalk...@gmail.com wrote: I believe

[Tutor] Extremely simple question

2012-01-10 Thread Chris Johnson
Hi there, I am *new* (I cannot put enough emphasis on that!) to Python programming, and to programming in general. I am trying to write out a statement that will protect a file on my computer from being run unless I enter the right specifications; your_weight = int(raw_input(Please enter your

Re: [Tutor] Extremely simple question

2012-01-10 Thread Noah Hall
On Wed, Jan 11, 2012 at 7:14 AM, Chris Johnson c.johnso...@gmail.com wrote: Hi there, I am *new* (I cannot put enough emphasis on that!) to Python programming, and to programming in general. I am trying to write out a statement that will protect a file on my computer from being run unless I