Re: New to python - Just a question

2020-07-03 Thread Tim Chase
On 2020-07-03 10:09, Daley Okuwa via Python-list wrote: > Write an algorithm (choose the language you prefer) that given a > character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will > print out the list of characters appearing at least 2 times. In > this specific example, it would return {‘a’

Re: New to python - Just a question

2020-07-03 Thread Rhodri James
On 03/07/2020 11:09, Daley Okuwa via Python-list wrote: Please can someone help Write an algorithm (choose the language you prefer) that given a character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of characters appearing at least 2 times. In this specific example

Re: New to python - Just a question

2020-07-03 Thread David Lowry-Duda
Hello! > Please can someone help > > Write an algorithm (choose the language you prefer) that given a > character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print > out the list of characters appearing at least 2 times. In this > specific example, it would return {‘a’}. Afterwards, c

New to python - Just a question

2020-07-03 Thread Daley Okuwa via Python-list
Please can someone help Write an algorithm (choose the language you prefer) that given a character string, for instance {‘c’,’a’,’i’,’o’,’p’,’a’}, will print out the list of characters appearing at least 2 times. In this specific example, it would return {‘a’}. Afterwards, comment out the cost

Re: (New to Python) Shopping List Code

2019-10-28 Thread Andrea D'Amore
On Mon, 28 Oct 2019 at 14:42, ferzan saglam wrote: > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > item = input() > item != -1: Try these

Re: (New to Python) Shopping List Code

2019-10-28 Thread Peter J. Holzer
On 2019-10-28 06:42:46 -0700, ferzan saglam wrote: > How can I stop this code when -1 is typed or at a maximum item count of ten. I'm just rewriting that sentence in Python: > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > >

Re: (New to Python) Shopping List Code

2019-10-28 Thread Bev In TX
> On Oct 28, 2019, at 8:42 AM, ferzan saglam wrote: > > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > > > total = 0

Re: (New to Python) Shopping List Code

2019-10-28 Thread Bev In TX
Bev > On Oct 28, 2019, at 8:42 AM, ferzan saglam wrote: > > How can I stop this code when -1 is typed or at a maximum item count of ten. > At the moment the code seems to be in a infinite loop meaning it keeps on > asking for an entry until -1 is typed > > > total = 0

(New to Python) Shopping List Code

2019-10-28 Thread ferzan saglam
How can I stop this code when -1 is typed or at a maximum item count of ten. At the moment the code seems to be in a infinite loop meaning it keeps on asking for an entry until -1 is typed total = 0 while True:

Re: new to python - like to write a script with the libvirt-python 5.3.0 package

2019-06-03 Thread Cameron Simpson
On 03Jun2019 16:32, Dennis Lee Bieber wrote: On Mon, 3 Jun 2019 17:05:52 +0200 (CEST), "Lentes, Bernd" declaimed the following: I wrote a shellscript to create consistent images of the virtual machines each night, using the bash and virsh (the libvirt shell). Script is running fairly fine, bu

new to python - like to write a script with the libvirt-python 5.3.0 package

2019-06-03 Thread Lentes, Bernd
Hello dear Python-community, i'm pretty new to Python. I made a seminar two weeks ago and like to write now a script because if i don't i will have forgotten everything in a few weeks. If this is the wrong place to ask my question please tell me where is the appropriate one. I'm

Re: New to Python and understanding problem

2018-02-03 Thread Michelle Konzack
Hello peter and *, Am 2018-02-03 hackte Peter J. Holzer in die Tasten: > On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote: >> Am 2018-01-29 hackte Dan Stromberg in die Tasten: >> > I don't see blueman on pypi, so this is probably part of the package >> > you downloaded, and not something you n

Re: New to Python and understanding problem

2018-02-03 Thread Peter J. Holzer
On 2018-01-29 19:14:57 +0100, Michelle Konzack wrote: > Am 2018-01-29 hackte Dan Stromberg in die Tasten: > > I don't see blueman on pypi, so this is probably part of the package > > you downloaded, and not something you need to "pip3 install". > > I have Python 2.7 and 3.5 from the Debian GNU/Lin

Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Good morning, Am 2018-01-30 hackte careenjosep...@gmail.com in die Tasten: > One contributing factor to this problem is the artificial environment that > online courses provide to students. Students are usually typing code into > a web page that contains instructions and hints. This is not how rea

Re: New to Python and understanding problem

2018-01-29 Thread careenjoseph36
One contributing factor to this problem is the artificial environment that online courses provide to students. Students are usually typing code into a web page that contains instructions and hints. This is not how real programming gets done. So when the course is over and it’s time to use a real

Re: New to Python and understanding problem

2018-01-29 Thread Peter Otten
Michelle Konzack wrote: > Hello *, > > because I am runing into problems with SOME python based programs, I the > this as opportunity to learn python (after ASM, C, BaSH, CP/M, COBOL, > JS, PHP and perl). > > > OK, I tried to install "blueman" (Bluetooth Manager) on my Debian 9.2 > (Stret

Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Hello Dan, Am 2018-01-29 hackte Dan Stromberg in die Tasten: > I don't see blueman on pypi, so this is probably part of the package > you downloaded, and not something you need to "pip3 install". I have Python 2.7 and 3.5 from the Debian GNU/Linux repository installed I use the Stable (Stretch) v

Re: New to Python and understanding problem

2018-01-29 Thread MRAB
On 2018-01-29 17:01, Michelle Konzack wrote: [snip] I think, that I have found the error here: sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] + sys.path because there is written in [ '/usr/lib/python-3.5/os.py' ]- To get a full path (w

Re: New to Python and understanding problem

2018-01-29 Thread Dan Stromberg
On Mon, Jan 29, 2018 at 9:01 AM, Michelle Konzack wrote: > OK, I tried to install "blueman" (Bluetooth Manager) on my Debian 9.2 > (Stretch system and discovered a problem: > > [ c 'blueman-applet' ]-- > Traceback (most recent call last): > File

New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Hello *, because I am runing into problems with SOME python based programs, I the this as opportunity to learn python (after ASM, C, BaSH, CP/M, COBOL, JS, PHP and perl). OK, I tried to install "blueman" (Bluetooth Manager) on my Debian 9.2 (Stretch system and discovered a problem: [

Re: New to Python - Career question

2017-06-24 Thread J. Clarke
In article , larry.mart...@gmail.com says... > > On Tue, Jun 6, 2017 at 6:37 PM, Marko Rauhamaa wrote: > > pta...@gmail.com: > > > >> New to Python and have been at it for about a month now. I'm doing > >> well and like it very much. Considering a caree

Re: New to Python - Career question

2017-06-14 Thread Larry Martell
On Sat, Jun 10, 2017 at 3:51 AM, Paul Rubin wrote: > Larry Martell writes: >> I can tell they think I am old and they dismiss me right away. > > http://oldgeekjobs.com ? Cool! Thanks! Sharing with all my old nerdy friends. -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - Career question

2017-06-10 Thread Paul Rubin
Larry Martell writes: > I can tell they think I am old and they dismiss me right away. http://oldgeekjobs.com ? -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Python - Career question

2017-06-08 Thread Fred Stluka
On 6/6/17 5:39 PM, [1]pta...@gmail.com wrote: New to Python and have been at it for about a month now. I'm doing well and like it very much. Considering a career change down the road and have been wondering... What are the job prospects for a middle age entry level programmer. Just t

Re: New to Python - Career question

2017-06-07 Thread Matt
On Tuesday, June 6, 2017 at 3:37:56 PM UTC-7, Marko Rauhamaa wrote: > pta...@gmail.com: > > > New to Python and have been at it for about a month now. I'm doing > > well and like it very much. Considering a career change down the road > > and have been wondering... W

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 6:37 PM, Marko Rauhamaa wrote: > pta...@gmail.com: > >> New to Python and have been at it for about a month now. I'm doing >> well and like it very much. Considering a career change down the road >> and have been wondering... What are the j

Re: New to Python - Career question

2017-06-06 Thread Marko Rauhamaa
pta...@gmail.com: > New to Python and have been at it for about a month now. I'm doing > well and like it very much. Considering a career change down the road > and have been wondering... What are the job prospects for a middle age > entry level programmer. Just tryin

Re: New to Python - Career question

2017-06-06 Thread Larry Martell
On Tue, Jun 6, 2017 at 5:39 PM, wrote: > New to Python and have been at it for about a month now. I'm doing well and > like it very much. Considering a career change down the road and have been > wondering... What are the job prospects for a middle age entry level > programme

New to Python - Career question

2017-06-06 Thread ptanyc
New to Python and have been at it for about a month now. I'm doing well and like it very much. Considering a career change down the road and have been wondering... What are the job prospects for a middle age entry level programmer. Just trying to get a better understanding where I stand c

Re: New to python and programming

2017-05-18 Thread Grant Edwards
On 2017-05-17, BT wrote: > I am fairly new to programming. I was just trying to understand how > this group works. Am i allowed to ask any questions that I may have > when i get stuck? Certainly. For best results, post small pieces of code that demonstrate your problem/question (cut and paste f

Re: New to python and programming

2017-05-18 Thread breamoreboy
On Wednesday, May 17, 2017 at 9:00:08 PM UTC+1, BT wrote: > Hi guys, > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Thanks You ca

Re: New to python and programming

2017-05-17 Thread Ray Cote
On Wed, May 17, 2017 at 4:43 PM, justin walters wrote: > On Wed, May 17, 2017 at 12:59 PM, BT wrote: > > > Hi guys, > > I am fairly new to programming. I was just trying to understand how this > > group works. Am i allowed to ask any questions that I may have when i get > > stuck? I mean is this

Re: New to python and programming

2017-05-17 Thread Ben Bacarisse
BT writes: > I am fairly new to programming. I was just trying to understand how > this group works. Am i allowed to ask any questions that I may have > when i get stuck? I mean is this group for new programmers as well..? Welcome. Yes, it's for pretty much any questions about Python programmin

Re: New to python and programming

2017-05-17 Thread Chris Angelico
On Thu, May 18, 2017 at 5:59 AM, BT wrote: > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Hi! Yes, it is, but if you're really R

Re: New to python and programming

2017-05-17 Thread justin walters
On Wed, May 17, 2017 at 12:59 PM, BT wrote: > Hi guys, > I am fairly new to programming. I was just trying to understand how this > group works. Am i allowed to ask any questions that I may have when i get > stuck? I mean is this group for new programmers as well..? > Thanks > -- > https://mail.p

New to python and programming

2017-05-17 Thread BT
Hi guys, I am fairly new to programming. I was just trying to understand how this group works. Am i allowed to ask any questions that I may have when i get stuck? I mean is this group for new programmers as well..? Thanks -- https://mail.python.org/mailman/listinfo/python-list

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:

Re: New to python

2016-10-18 Thread Chris Warrick
On 17 October 2016 at 21:51, Bill Cunningham wrote: > I just installed python I might start with 3. But there is version 2 out > too. So far I can '3+4' and get the answer. Nice. I typed the linux man page > and got a little info. So to learn this language is there an online > tutorial? I am i

Re: New to python

2016-10-17 Thread justin walters
On Mon, Oct 17, 2016 at 12:51 PM, Bill Cunningham wrote: > I just installed python I might start with 3. But there is version 2 out > too. So far I can '3+4' and get the answer. Nice. I typed the linux man > page > and got a little info. So to learn this language is there an online > tutorial? I

  1   2   3   4   5   6   7   8   >