Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Steven D'Aprano
On Thursday 05 January 2017 10:21, Terry Reedy wrote: > On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: > >> And that statement tells us you are trying to run from within some >> IDE/editor which is trapping Python exceptions and producing a dialog >> box for them. > > IDLE does this when one runs

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Terry Reedy
On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: > And that statement tells us you are trying to run from within some > IDE/editor which is trapping Python exceptions and producing a dialog > box for them. IDLE does this when one runs code from the editor, because it cannot/should not inject error

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Larry Hudson via Python-list
On 01/03/2017 04:27 PM, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: >> On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: >>> I doubt it's getting that far (I can see at least one syntax error in the >>> code pasted). >> >> True true. In any case, t

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Steven D'Aprano
On Wednesday 04 January 2017 12:25, Callum Robinson wrote: > Hey man thanks, the sad thing is i have no idea why i put that in. I must be > having a terrible day. Don't worry about it. The difference between a beginner and an expert is *not* that experts make fewer mistakes, but that experts kno

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Dennis Lee Bieber
On Tue, 3 Jan 2017 16:27:33 -0800 (PST), Callum Robinson declaimed the following: >On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: >> On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: >> > I doubt it's getting that far (I can see at least one syntax error in the >> > code pa

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Erik
On 04/01/17 02:47, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: > I did it and this is what it states when i run it > > hello. > I have thought of a number between 1 and 100. > Can you guess it? > 5 > Low > Sorry , you are too high. Try again. > > Does th

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Erik
On 04/01/17 03:25, Steven D'Aprano wrote: > On Wednesday 04 January 2017 12:25, Callum Robinson wrote: > >> Hey man thanks, the sad thing is i have no idea why i put that in. I must be >> having a terrible day. > > Don't worry about it. The difference between a beginner and an expert is *not* > tha

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: > On 04/01/17 02:24, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > >> What values can 'is_same' return? > >> > >> Which of those values are you checking for in the loop? > > > > I'm sorry

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Dennis Lee Bieber
On Tue, 3 Jan 2017 18:47:43 -0800 (PST), Callum Robinson declaimed the following: > >hello. >I have thought of a number between 1 and 100. >Can you guess it? >5 >Low >Sorry , you are too high. Try again. > >Does this mean the number i entered is to low but the code is still stating it is to high

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Erik
On 04/01/17 02:24, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: >> What values can 'is_same' return? >> >> Which of those values are you checking for in the loop? > > I'm sorry but i do not completely understand what you are stating You need to think abo

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Steven D'Aprano
On Wednesday 04 January 2017 13:24, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: >> On 2017-01-04 01:37, Callum Robinson wrote: >> > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson >> > wrote: >> >> Im doing a new task from my teache

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > On 2017-01-04 01:37, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > >> Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone he

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread MRAB
On 2017-01-04 01:37, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: >> Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? >> >> #mynumber.py >> # this game uses a home made function >> imp

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:45:22 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:30, Callum Robinson wrote: > > I feel like im missing something so blatantly obvious. > > That's because you are ;). I don't want to come across as patronising, > but I want you to see it for yourself, s

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random > > #think of a number > computer_number

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Steve D'Aprano
On Wed, 4 Jan 2017 11:16 am, Callum Robinson wrote: > My apologizes but i'm quite new and would need instructions to what > information you need me to get. Do you know how to copy and paste from the terminal window? Somewhere on the screen you see something like: x = 23 + ) ^

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: > > if target == number: >

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Erik
Hi Callum, On 04/01/17 00:30, Callum Robinson wrote: > I feel like im missing something so blatantly obvious. That's because you are ;). I don't want to come across as patronising, but I want you to see it for yourself, so, here's a function definition similar to yours that doesn't have the sam

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 2:16:08 PM UTC+13, Steve D'Aprano wrote: > On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > > > Traceback (most recent call last): > > File "D:/Python/random.py", line 6, in > > computer_number = number.randint(1, 100) > > NameError: name 'number' is not

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:03:18 PM UTC+13, Erik wrote: > On 03/01/17 23:56, Chris Angelico wrote: > > On Wed, Jan 4, 2017 at 10:49 AM, wrote: > >> #think of a number > >> computer_number = number.randint(1,100) > > > > What's wrong is that you aren't showing us the exception you get on >

Re: Hey, I'm new to python so don't judge.

2017-01-06 Thread Terry Reedy
On 1/3/2017 7:02 PM, Callum Robinson wrote: > When i check the code it comes up with invalid syntax and my writing line gets re directed here > > def is_same(target, number: > if target == number: > result="win" > elif target > number: > result="low" >

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Chris Angelico
On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > I doubt it's getting that far (I can see at least one syntax error in the > code pasted). True true. In any case, the point is to copy and paste the error message. Callum, please, copy and paste it. ChrisA -- https://mail.python.org/mailman/listi

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Steve D'Aprano
On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > Traceback (most recent call last): > File "D:/Python/random.py", line 6, in > computer_number = number.randint(1, 100) > NameError: name 'number' is not defined That's exactly what we need to see! The full traceback, thank you! You're

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Erik
On 04/01/17 00:32, Callum Robinson wrote: > I forgot a bloody bracket xD Cool, you got it ;) It's the sort of thing your brain will see instantly once you've done it a few times :D > and now theirs a new error ill try to figure this out on my own. You need to look back to Chris's original reply

Hey, I'm new to python so don't judge.

2017-01-05 Thread cr2001
Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? #mynumber.py # this game uses a home made function import random #think of a number computer_number = number.randint(1,100) #create the function is_same() def is_same(target, number:

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: > > if target == number: >

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
When i check the code it comes up with invalid syntax and my writing line gets re directed here def is_same(target, number: if target == number: result="win" elif target > number: result="low" else: result="high" return result -

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Dennis Lee Bieber
On Tue, 3 Jan 2017 16:02:15 -0800 (PST), Callum Robinson declaimed the following: >When i check the code it comes up with invalid syntax and my writing line gets re directed here > >def is_same(target, number: >if target == number: >result="win" >elif target > number:

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Chris Angelico
On Wed, Jan 4, 2017 at 10:49 AM, wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random > > #think of a number > computer_number = number.randint(1,100) What's w

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Erik
Hi Callum, On 04/01/17 00:02, Callum Robinson wrote: > When i check the code it comes up with invalid syntax and my writing line gets re directed here > > def is_same(target, number: > if target == number: > result="win" > elif target > number: > resu

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > > I doubt it's getting that far (I can see at least one syntax error in the > > code pasted). > > True true. In any case, the point is to copy and paste the error > message. C

Re: Hey, I'm new to python so don't judge.

2017-01-05 Thread Erik
On 03/01/17 23:56, Chris Angelico wrote: > On Wed, Jan 4, 2017 at 10:49 AM, wrote: >> #think of a number >> computer_number = number.randint(1,100) > > What's wrong is that you aren't showing us the exception you get on > this line. *Copy and paste* that exception - the whole thing. It's > very h

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Terry Reedy
On 1/4/2017 9:51 PM, Steven D'Aprano wrote: On Thursday 05 January 2017 10:21, Terry Reedy wrote: IDLE does this when one runs code from the editor, because it cannot/should not inject error messages into the editor buffer... AND it replaces the ^ with red highlighting of the code pointed to.

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Steven D'Aprano
On Thursday 05 January 2017 10:21, Terry Reedy wrote: > On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: > >> And that statement tells us you are trying to run from within some >> IDE/editor which is trapping Python exceptions and producing a dialog >> box for them. > > IDLE does this when one run

Re: Hey, I'm new to python so don't judge.

2017-01-04 Thread Terry Reedy
On 1/3/2017 10:15 PM, Dennis Lee Bieber wrote: And that statement tells us you are trying to run from within some IDE/editor which is trapping Python exceptions and producing a dialog box for them. IDLE does this when one runs code from the editor, because it cannot/should not inject error me

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Larry Hudson via Python-list
On 01/03/2017 04:27 PM, Callum Robinson wrote: On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: I doubt it's getting that far (I can see at least one syntax error in the code pasted). True true. In any case, the point is t

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
On 04/01/17 03:25, Steven D'Aprano wrote: On Wednesday 04 January 2017 12:25, Callum Robinson wrote: Hey man thanks, the sad thing is i have no idea why i put that in. I must be having a terrible day. Don't worry about it. The difference between a beginner and an expert is *not* that experts

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Steven D'Aprano
On Wednesday 04 January 2017 12:25, Callum Robinson wrote: > Hey man thanks, the sad thing is i have no idea why i put that in. I must be > having a terrible day. Don't worry about it. The difference between a beginner and an expert is *not* that experts make fewer mistakes, but that experts kno

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Steven D'Aprano
On Wednesday 04 January 2017 13:24, Callum Robinson wrote: > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: >> On 2017-01-04 01:37, Callum Robinson wrote: >> > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson >> > wrote: >> >> Im doing a new task from my teache

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
On 04/01/17 02:47, Callum Robinson wrote: On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: I did it and this is what it states when i run it hello. I have thought of a number between 1 and 100. Can you guess it? 5 Low Sorry , you are too high. Try again. Does this mean the number

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:35:53 PM UTC+13, Erik wrote: > On 04/01/17 02:24, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > >> What values can 'is_same' return? > >> > >> Which of those values are you checking for in the loop? > > > > I'm sorry

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
On 04/01/17 02:24, Callum Robinson wrote: On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: What values can 'is_same' return? Which of those values are you checking for in the loop? I'm sorry but i do not completely understand what you are stating You need to think about the s

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 3:05:48 PM UTC+13, MRAB wrote: > On 2017-01-04 01:37, Callum Robinson wrote: > > On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > >> Im doing a new task from my teacher but i can't seem to find what is wrong > >> with this code. Can any

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread MRAB
On 2017-01-04 01:37, Callum Robinson wrote: On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? #mynumber.py # this game uses a home made function import random

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 12:49:28 PM UTC+13, Callum Robinson wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong > with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random > > #think of a number > computer_n

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 2:16:08 PM UTC+13, Steve D'Aprano wrote: > On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > > > Traceback (most recent call last): > > File "D:/Python/random.py", line 6, in > > computer_number = number.randint(1, 100) > > NameError: name 'number' is no

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Steve D'Aprano
On Wed, 4 Jan 2017 12:04 pm, Callum Robinson wrote: > Traceback (most recent call last): > File "D:/Python/random.py", line 6, in > computer_number = number.randint(1, 100) > NameError: name 'number' is not defined That's exactly what we need to see! The full traceback, thank you! You're

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:45:22 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:30, Callum Robinson wrote: > > I feel like im missing something so blatantly obvious. > > That's because you are ;). I don't want to come across as patronising, > but I want you to see it for yourself

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Steve D'Aprano
On Wed, 4 Jan 2017 11:16 am, Callum Robinson wrote: > My apologizes but i'm quite new and would need instructions to what > information you need me to get. Do you know how to copy and paste from the terminal window? Somewhere on the screen you see something like: x = 23 + ) ^

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Terry Reedy
On 1/3/2017 7:02 PM, Callum Robinson wrote: When i check the code it comes up with invalid syntax and my writing line gets re directed here def is_same(target, number: if target == number: result="win" elif target > number: result="low" else:

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
On 04/01/17 00:32, Callum Robinson wrote: I forgot a bloody bracket xD Cool, you got it ;) It's the sort of thing your brain will see instantly once you've done it a few times :D and now theirs a new error ill try to figure this out on my own. You need to look back to Chris's original rep

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
Hi Callum, On 04/01/17 00:30, Callum Robinson wrote: I feel like im missing something so blatantly obvious. That's because you are ;). I don't want to come across as patronising, but I want you to see it for yourself, so, here's a function definition similar to yours that doesn't have the sa

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: > > if target == number:

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:26:26 PM UTC+13, Erik wrote: > Hi Callum, > > On 04/01/17 00:02, Callum Robinson wrote: > > When i check the code it comes up with invalid syntax and my writing > line gets re directed here > > > > def is_same(target, number: > > if target == number:

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:17:11 PM UTC+13, Chris Angelico wrote: > On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > > I doubt it's getting that far (I can see at least one syntax error in the > > code pasted). > > True true. In any case, the point is to copy and paste the error > message.

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
Hi Callum, On 04/01/17 00:02, Callum Robinson wrote: > When i check the code it comes up with invalid syntax and my writing line gets re directed here > > def is_same(target, number: > if target == number: > result="win" > elif target > number: > result="

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
On Wednesday, January 4, 2017 at 1:03:18 PM UTC+13, Erik wrote: > On 03/01/17 23:56, Chris Angelico wrote: > > On Wed, Jan 4, 2017 at 10:49 AM, wrote: > >> #think of a number > >> computer_number = number.randint(1,100) > > > > What's wrong is that you aren't showing us the exception you get on >

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Chris Angelico
On Wed, Jan 4, 2017 at 11:03 AM, Erik wrote: > I doubt it's getting that far (I can see at least one syntax error in the > code pasted). True true. In any case, the point is to copy and paste the error message. Callum, please, copy and paste it. ChrisA -- https://mail.python.org/mailman/listinf

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Callum Robinson
When i check the code it comes up with invalid syntax and my writing line gets re directed here def is_same(target, number: if target == number: result="win" elif target > number: result="low" else: result="high" return result --

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Erik
On 03/01/17 23:56, Chris Angelico wrote: On Wed, Jan 4, 2017 at 10:49 AM, wrote: #think of a number computer_number = number.randint(1,100) What's wrong is that you aren't showing us the exception you get on this line. *Copy and paste* that exception - the whole thing. It's very helpful. I

Re: Hey, I'm new to python so don't judge.

2017-01-03 Thread Chris Angelico
On Wed, Jan 4, 2017 at 10:49 AM, wrote: > Im doing a new task from my teacher but i can't seem to find what is wrong > with this code. Can anyone help? > > #mynumber.py > # this game uses a home made function > import random > > #think of a number > computer_number = number.randint(1,100) What'

Hey, I'm new to python so don't judge.

2017-01-03 Thread cr2001
Im doing a new task from my teacher but i can't seem to find what is wrong with this code. Can anyone help? #mynumber.py # this game uses a home made function import random #think of a number computer_number = number.randint(1,100) #create the function is_same() def is_same(target, number: