Re: [Tutor] Help with Python

2014-05-16 Thread Steven D'Aprano
Hi Glen, and welcome! My responses below. On Thu, May 15, 2014 at 09:58:07PM -0400, Glen Chan wrote: > Hello, I am student trying to fugure out why when I enter any number > it says error. It's only suppose to do that if it's out the 1-10 > range. Please help. Thank you. You've made an mistake

Re: [Tutor] Help with Python

2014-05-16 Thread Alan Gauld
On 16/05/14 02:58, Glen Chan wrote: Hello, I am student trying to fugure out why when I enter any number it says error. Because that's what you programmed it to do. Almost. If you enter 1 or 10 you won't get an error. Look at your logic: number = input('Enter a number between 1 and 10: ') wh

[Tutor] Help with Python

2014-05-16 Thread Glen Chan
Hello, I am student trying to fugure out why when I enter any number it says error. It's only suppose to do that if it's out the 1-10 range. Please help. Thank you. number = input('Enter a number between 1 and 10: ') while number < 1 or number > 10: print 'Please enter a number between 1