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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 + )
^
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:
>
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
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
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
>
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"
>
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
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
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
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:
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:
>
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
-
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:
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 + )
^
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:
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
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
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:
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:
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.
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="
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
>
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
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
--
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
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'
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:
62 matches
Mail list logo