Re: [Tutor] New Line Problem

2018-02-02 Thread Alan Gauld via Tutor
On 02/02/18 02:44, Anna Lapre wrote: > I am having a problem with creating a new line in a return statement for a > function. It has a mix of a bunch of strings and variables. Everything that > I want included will print, except for the new lines. I have tried "\n" but > with no luck. Do you have a

Re: [Tutor] New Line Problem

2018-02-02 Thread Peter Otten
Anna Lapre wrote: > I am having a problem with creating a new line in a return statement for a > function. It has a mix of a bunch of strings and variables. Everything > that I want included will print, except for the new lines. I have tried > "\n" but with no luck. Do you have any recommendations

[Tutor] New Line Problem

2018-02-02 Thread Anna Lapre
I am having a problem with creating a new line in a return statement for a function. It has a mix of a bunch of strings and variables. Everything that I want included will print, except for the new lines. I have tried "\n" but with no luck. Do you have any recommendations? Thanks. http://py3.codes

Re: [Tutor] New Item

2017-10-15 Thread Peter Otten
Sydney Shall wrote: > On 28/09/2017 11:46, Peter Otten wrote: >> larrystale...@comcast.net wrote: >> >>> I am very new to Python and appreciate the input as I was able to fully >>> install Python with all needed libraries (i.e., numpy, pandas, etc.). >>> However, I now have an application questio

Re: [Tutor] New Item

2017-10-15 Thread Sydney Shall
On 28/09/2017 11:46, Peter Otten wrote: larrystale...@comcast.net wrote: I am very new to Python and appreciate the input as I was able to fully install Python with all needed libraries (i.e., numpy, pandas, etc.). However, I now have an application question in needed to construct a 2D Histogra

Re: [Tutor] New Item

2017-09-28 Thread Peter Otten
larrystale...@comcast.net wrote: > I am very new to Python and appreciate the input as I was able to fully > install Python with all needed libraries (i.e., numpy, pandas, etc.). > However, I now have an application question in needed to construct a 2D > Histogram. > > Basically, I have an Excel

[Tutor] New Item

2017-09-28 Thread LARRYSTALEY07
I am very new to Python and appreciate the input as I was able to fully install Python with all needed libraries (i.e., numpy, pandas, etc.). However, I now have an application question in needed to construct a 2D Histogram. Basically, I have an Excel file that includes three columns: Column 1

Re: [Tutor] New to Python

2017-09-15 Thread Abdur-Rahmaan Janhangeer
1) valuable resources : sololearn tutorialspoint python3 top tip : concentrate on concepts good books for beginners there are many like .. dive into python 3 available free online .. automate the boring stuff available free online a good reference-like book: .. Learning Python .. Programming P

Re: [Tutor] New to Python

2017-09-08 Thread Alan Gauld via Tutor
On 08/09/17 08:35, George Fischhof wrote: > As this is a really frequent question, maybe it would be good to put a > short list (the answers cumulated no more than about 10 websites) into the > welcome message of the Tutor mailing list. The welcome message should be a very short (ideally one "scr

Re: [Tutor] New to Python

2017-09-08 Thread George Fischhof
2017-09-07 20:39 GMT+02:00 boB Stepp : > Welcome to Tutor! > > On Thu, Sep 7, 2017 at 8:14 AM, Vikram Singh > wrote: > > I've been learning Python from Google For Education > > . A little help will be > > appreciated regarding the right way and right tut

Re: [Tutor] New to Python

2017-09-07 Thread boB Stepp
Welcome to Tutor! On Thu, Sep 7, 2017 at 8:14 AM, Vikram Singh wrote: > I've been learning Python from Google For Education > . A little help will be > appreciated regarding the right way and right tutorials to learn Python > from. Thanks in advance. Th

[Tutor] New to Python

2017-09-07 Thread Vikram Singh
I've been learning Python from Google For Education . A little help will be appreciated regarding the right way and right tutorials to learn Python from. Thanks in advance. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] new to python

2017-07-26 Thread N6Ghost
On 7/25/2017 12:43 AM, Alan Gauld via Tutor wrote: On 25/07/17 04:58, N6Ghost wrote: this code works f = open("C:/coderoot/python3/level1/inputfile.txt", 'r') for line in f: for line in f: #print(line.rstrip()) print(line) f.close() the out put skips the first line

Re: [Tutor] new to python

2017-07-25 Thread Alan Gauld via Tutor
On 25/07/17 04:58, N6Ghost wrote: > this code works > f = open("C:/coderoot/python3/level1/inputfile.txt", 'r') > for line in f: > for line in f: > #print(line.rstrip()) > print(line) > > f.close() > the out put skips the first line of the inputfile and puts a blank line

Re: [Tutor] new to python

2017-07-25 Thread Andre Engels
The problem here is that you have doubled the "for line in f:" line. Given that you say you know some programming, I'll just cut to the technical name of the problem you are having: You are changing the value of a loop variable (by starting an inner loop with the same loop variable) inside a loop.

Re: [Tutor] new to python

2017-07-25 Thread N6Ghost
On 7/23/2017 1:03 AM, Alan Gauld via Tutor wrote: On 23/07/17 07:26, N6Ghost wrote: f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') for line in file: Note that you have no variable called 'file'. So this line doesn't make sense. for line in f: print(line.rstripe()

Re: [Tutor] new to python

2017-07-24 Thread Mats Wichmann
On 07/24/2017 04:32 PM, N6Ghost wrote: > update code: > f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') > for line in f: > for line in f: > print(line.rstripe()) > > f.close() > > > C:\coderoot\python3\level1>python secondscript.py > Traceback (most recent call las

Re: [Tutor] new to python

2017-07-24 Thread N6Ghost
On 7/23/2017 1:03 AM, Alan Gauld via Tutor wrote: On 23/07/17 07:26, N6Ghost wrote: f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') for line in file: Note that you have no variable called 'file'. So this line doesn't make sense. for line in f: print(line.rstripe()

Re: [Tutor] new to python

2017-07-23 Thread Mats Wichmann
On 07/23/2017 09:16 AM, Alex Kleider wrote: > On 2017-07-23 01:06, Anish Tambe wrote: >>> for line in file: >> >> This line is not required as the you have opened your file to 'f'. >> 'file' is a built-in class. Type - >> help(file) >> on the interpreter to know more about it. > > This appears to

Re: [Tutor] new to python

2017-07-23 Thread Alex Kleider
On 2017-07-23 01:06, Anish Tambe wrote: for line in file: This line is not required as the you have opened your file to 'f'. 'file' is a built-in class. Type - help(file) on the interpreter to know more about it. This appears to be true in python2x but not in python3: alex@X301n3:~$ python3

Re: [Tutor] new to python

2017-07-23 Thread Peter Otten
N6Ghost wrote: > C:\coderoot\python3\level1>python > Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > > /windows 10 x64 > > new to python, but not really new to programming. > >

Re: [Tutor] new to python

2017-07-23 Thread Anish Tambe
> for line in file: This line is not required as the you have opened your file to 'f'. 'file' is a built-in class. Type - help(file) on the interpreter to know more about it. > for line in f: > print(line.rstripe()) > f.close() Are you sure that you need to close the file aft

Re: [Tutor] new to python

2017-07-23 Thread Alan Gauld via Tutor
On 23/07/17 07:26, N6Ghost wrote: > > f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') > for line in file: Note that you have no variable called 'file'. So this line doesn't make sense. > for line in f: > print(line.rstripe()) This bit will work if you omit the line abov

[Tutor] new to python

2017-07-23 Thread N6Ghost
C:\coderoot\python3\level1>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. /windows 10 x64 new to python, but not really new to programming. going through the beginners docs

Re: [Tutor] New blog that has solution for python programs

2017-06-03 Thread Jay Lozier
On 06/02/2017 09:07 PM, Mats Wichmann wrote: I don't think "what the authors might want" is the only factor here. Personally, I think these programming challenge sites probably do more harm than good, discouraging people that they're not good enough to be a programmer because they can't solve t

Re: [Tutor] New blog that has solution for python programs

2017-06-03 Thread Mats Wichmann
> I don't think "what the authors might want" is the only factor here. > Personally, I think these programming challenge sites probably do more > harm than good, discouraging people that they're not good enough to be a > programmer because they can't solve the (often exceedingly tricky) > prob

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread meenu ravi
Great, thanks! On Jun 2, 2017 10:26 PM, "Danny Yoo" wrote: > Steven says: > > >> I don't think "what the authors might want" is the only factor here. > >> Personally, I think these programming challenge sites probably do more > >> harm than good, discouraging people that they're not good enough

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Danny Yoo
Steven says: >> I don't think "what the authors might want" is the only factor here. >> Personally, I think these programming challenge sites probably do more >> harm than good, discouraging people that they're not good enough to be a >> programmer because they can't solve the (often exceedingly t

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread meenu ravi
Thank you all for your views. I was hesitating for the same reason. Now I'm clear that I shouldn't go for a blog that gives straightforward solution for the challenges. Thanks, Meena On Jun 2, 2017 7:30 PM, "Steven D'Aprano" wrote: > On Fri, Jun 02, 2017 at 05:00:37PM -0700, Danny Yoo wrote: >

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Steven D'Aprano
On Fri, Jun 02, 2017 at 05:00:37PM -0700, Danny Yoo wrote: > Legality is the lowest of bars. We should aim higher. > > I'm pretty sure that the listed sites should strongly prefer *not* to have > solutions available like this. > > The more I think about this, the more I'm tending to say: don't

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Danny Yoo
Legality is the lowest of bars. We should aim higher. I'm pretty sure that the listed sites should strongly prefer *not* to have solutions available like this. The more I think about this, the more I'm tending to say: don't do this. It may feel like charity, but the authors of the problem sets

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Danny Yoo
I'm not a fan of the idea of publishing solutions of coding challenge problems because it often violates the honor codes of institutions. Even if some sites are okay with this, the majority probably are not. Rather than muddy the water, might be best to skirt the issue. What is the problem you're

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Mats Wichmann
On 06/02/2017 11:27 AM, meenu ravi wrote: > Hello, > > I'm planning to create a blog that provides solution with explanation for > python programming challenges available in websites like Hackerearth, > codecademy, etc., so that if others also share their solution along with > explanation in the s

Re: [Tutor] New blog that has solution for python programs

2017-06-02 Thread Japhy Bartlett
The only legal concern is if you're copying challenges directly from the sites; someone has some sort of ownership and copyright on the code and description. Don't copy / paste anything and you'll be fine. If you do, check the license first (it may be open source). On Fri, Jun 2, 2017 at 12:2

[Tutor] New blog that has solution for python programs

2017-06-02 Thread meenu ravi
Hello, I'm planning to create a blog that provides solution with explanation for python programming challenges available in websites like Hackerearth, codecademy, etc., so that if others also share their solution along with explanation in the same blog, it will be helpful for beginners. I wanted t

Re: [Tutor] New to Python

2016-10-27 Thread Danny Yoo
> program-they just do it. Also noticed-when starting new file sometimes I > see run at the top sometimes not? Lots of questions. Familiar with > programming in C. If you're a database and C developer, then you probably have enough experience to go through the Python tutorial, as it is aimed for

Re: [Tutor] New to Python

2016-10-27 Thread Alan Gauld via Tutor
On 28/10/16 01:05, Rusty Bayles wrote: > Thanks for the reply Alan, > Could you please tell me more detail on the videos? Like who made them. Some are just amateurs others are professional (or at least Youtube regulars) Here are a couple of links, but to be honest just about any of them would mee

Re: [Tutor] New to Python

2016-10-27 Thread Alan Gauld via Tutor
On 27/10/16 23:41, Rusty Bayles wrote: > I just installed 3.5.2 interpreter and cannot figure out how to run > program. I strongly suggest you go to Youtube and search for IDLE. There are several short (3-10min) videos there that should make it clear where you are going wrong. Watch a couple

[Tutor] New to Python

2016-10-27 Thread Rusty Bayles
I just installed 3.5.2 interpreter and cannot figure out how to run program. I am a database developer and my first attempt at sqllite3 has beeen a disasterr! When I run a program (after importinh sqllite and doing connection setups and attempting to setup table. When I press run (F5?) the firs

Re: [Tutor] New to Python, Already Confused

2016-09-20 Thread Steven D'Aprano
On Mon, Sep 19, 2016 at 11:01:30PM +, Gampper, Terry wrote: > Hello > I started my journey with Python last week and find it to be an > easy-to-learn language. I am currently teaching introduction to > computer programming. One of the assignments we are working on > involves an instructor gi

Re: [Tutor] New to Python, Already Confused

2016-09-20 Thread Joel Goldstick
You should probably convert scores to ints on input. At any rate, here is your problem: low_tscore = min(tscore1,tscore2,tscore3,tscore4,tscore5) You need to convert tscore1, etc. to ints, otherwise min will give lexical comparison (alphabetic order), not numeric order On Mon, Sep 19, 2016 at 7

[Tutor] New to Python, Already Confused

2016-09-20 Thread Gampper, Terry
Hello I started my journey with Python last week and find it to be an easy-to-learn language. I am currently teaching introduction to computer programming. One of the assignments we are working on involves an instructor giving a series of 5 tests, and the lowest score is dropped, then calculatin

Re: [Tutor] new line to list of strings send by email

2016-01-08 Thread Bob Gailer
On Jan 8, 2016 11:03 AM, "Emil Natan" wrote: > > Hello list, > > I have a function which receives a string and sends it as a body of an > email. > > It is a part of a program which does certain checks on network > infrastructure. When a check fails I append error message to a > error_collector lis

[Tutor] new line to list of strings send by email

2016-01-08 Thread Emil Natan
Hello list, I have a function which receives a string and sends it as a body of an email. It is a part of a program which does certain checks on network infrastructure. When a check fails I append error message to a error_collector list: if self.check_axfr_refused(ip): error_collector.appe

Re: [Tutor] New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran Ahluwalia
Danny, You were spot on with that issue. I debugged this. Here are my two commits for my homework: Starting with pyinotify and OS agnostic?

Re: [Tutor] New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Dave Angel
On 04/02/2015 08:28 AM, Saran Ahluwalia wrote: Good Morning: I understand this error message when I run this code. However, I am curious to know what the most pythonic way is to convert the list to a string? I use Python 2.7. "Traceback (most recent call last): before = dict([(f, None) for f i

Re: [Tutor] New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Danny Yoo
On Thu, Apr 2, 2015 at 12:19 PM, Saran Ahluwalia wrote: > Danny, > > You were spot on with that issue. I debugged this. Here are my two commits > for my homework: Starting with pyinotify and OS agnostic? I am still working > on the latter - in regards to adding more customization that fits the > h

Re: [Tutor] New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Danny Yoo
On Apr 2, 2015 9:45 AM, "Saran Ahluwalia" wrote: > > Good Morning: > > I understand this error message when I run this code. However, I am curious > to know what the most pythonic way is to convert the list to a string? I > use Python 2.7. > > "Traceback (most recent call last): > before = dict([

[Tutor] New to Programming: TypeError: coercing to Unicode: need string or buffer, list found

2015-04-02 Thread Saran Ahluwalia
Good Morning: I understand this error message when I run this code. However, I am curious to know what the most pythonic way is to convert the list to a string? I use Python 2.7. "Traceback (most recent call last): before = dict([(f, None) for f in os.listdir(dirlist)]) TypeError: coercing to Un

Re: [Tutor] New at Python

2014-10-05 Thread Steven D'Aprano
On Sun, Oct 05, 2014 at 06:40:39PM -0400, Mike Spaulding wrote: > Given that n refers to a positive int use a while loop to compute the sum of > the cubes of the first n counting numbers, and associate this value with > total . Use no >

Re: [Tutor] New at Python

2014-10-05 Thread Danny Yoo
On Sun, Oct 5, 2014 at 3:40 PM, Mike Spaulding wrote: > Given that n refers to a positive int use a while loop to compute the sum of > the cubes of the first n counting numbers, and associate this value with > total . Use no variables other than n , k , and total . > > Hi, I am really a rookie at

Re: [Tutor] New at Python

2014-10-05 Thread Alan Gauld
On 05/10/14 23:40, Mike Spaulding wrote: Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and associate this value with total . Use no variables other than n , k , and total . lab and the accompanying online book. The big

Re: [Tutor] New at Python

2014-10-05 Thread R. Alan Monroe
> while loop to compute > the sum of the cubes of the first n counting numbers > do you have any suggestions as to how I need to look at a problem > and to “identify” what exactly it is asking for, Can you do it on paper? If I gave you "5" as a starting point, could you write down on your paper 1

[Tutor] New at Python

2014-10-05 Thread Mike Spaulding
Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and associate this value with total . Use no variables other than n , k , and total . Hi, I am r

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Felisha Lawrence
These are all the files. No two filenames are the same swp.1120630020111.KLWX.0.0.5_PPI_v2 swp.1120630020143.KLWX.0.0.9_PPI_v3 swp.1120630020215.KLWX.0.1.3_PPI_v4 swp.1120630020247.KLWX.0.1.8_PPI_v5 swp.1120630020302.KLWX.0.2.4_PPI_v6 swp.1120630020316.KLWX.0.3.1_PPI_v7 swp.1120630020330.KLWX.0.

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Cameron Simpson
On 04Sep2014 15:01, Joel Goldstick wrote: On Thu, Sep 4, 2014 at 8:49 AM, Felisha Lawrence wrote: I have a question regarding strings in python. I have a directory on my MacBook Bro of about 13 files. I need to alter the file endings in that directory. The files are on the order of 'swp.113006

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Danny Yoo
On Thu, Sep 4, 2014 at 12:05 PM, taserian wrote: > Is there anything different between the filenames aside from that suffix > _vXX? If not, then you'll run into problems after the first filename is > changed; further attempts won't allow the change, since there's already a > file with that same na

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Danny Yoo
> I have a question regarding strings in python. I have a directory on my > MacBook Bro of about 13 files. I need to alter the file endings in that > directory. The files are on the order of > 'swp.113006004000_KLWX_0.0.5_PPI_v2','swp.113006004000_KLWX_0.0.5_PPI_v3'. I > need to remove the characte

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Alan Gauld
On 04/09/14 13:49, Felisha Lawrence wrote: 'swp.113006004000_KLWX_0.0.5_PPI_v2','swp.113006004000_KLWX_0.0.5_PPI_v3'. I need to remove the characters after the 'v' and replace with v20. All of the endings of the files are sequential _v2, _v3,_v4, _v5. I need all of these characters to be the sam

Re: [Tutor] New to Python..Need help

2014-09-04 Thread taserian
Is there anything different between the filenames aside from that suffix _vXX? If not, then you'll run into problems after the first filename is changed; further attempts won't allow the change, since there's already a file with that same name. AR On Thu, Sep 4, 2014 at 8:49 AM, Felisha Lawrence

Re: [Tutor] New to Python..Need help

2014-09-04 Thread Joel Goldstick
On Thu, Sep 4, 2014 at 8:49 AM, Felisha Lawrence wrote: > Hello, > I have a question regarding strings in python. I have a directory on my > MacBook Bro of about 13 files. I need to alter the file endings in that > directory. The files are on the order of > 'swp.113006004000_KLWX_0.0.5_PPI_v2','sw

[Tutor] New to Python..Need help

2014-09-04 Thread Felisha Lawrence
Hello, I have a question regarding strings in python. I have a directory on my MacBook Bro of about 13 files. I need to alter the file endings in that directory. The files are on the order of 'swp.113006004000_KLWX_0.0.5_PPI_v2','swp.113006004000_KLWX_0.0.5_PPI_v3'. I need to remove the characters

Re: [Tutor] New dealing with Pythong and programming

2014-08-06 Thread Danny Yoo
See if: https://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/IDLE_spanish.html is helpful. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] New dealing with Pythong and programming

2014-08-06 Thread Danny Yoo
Hi William, You can take a look at the beginner's guides to Python: https://wiki.python.org/moin/BeginnersGuide If your native language is Spanish, you may want to look at: https://wiki.python.org/moin/SpanishLanguage and see if there are any tutorials there that are easier for you to

Re: [Tutor] New dealing with Pythong and programming

2014-08-06 Thread Joel Goldstick
On Wed, Aug 6, 2014 at 12:29 PM, William Vargas wrote: > Hello > > My name is Will, I live in Costa Rica and I really want to learn how to > program. In the past, a friend said to me that was really cool but I did not > feel the call to learn, but now I was talking to a new friend and he said to >

[Tutor] New dealing with Pythong and programming

2014-08-06 Thread William Vargas
Hello My name is Will, I live in Costa Rica and I really want to learn how to program. In the past, a friend said to me that was really cool but I did not feel the call to learn, but now I was talking to a new friend and he said to me code was really great then I ask what was the best language and

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Dave Angel
Marc Tompkins Wrote in message: > On Tue, Aug 5, 2014 at 8:23 AM, Zachary Ware > wrote: >> >> which it should be if the most recently >> installed Python was 3.3 or 3.4, installed with default options. >> > > And there we have my problem with this glorious new "feature". YOU > CAN'T RELY ON IT,

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Marc Tompkins
On Tue, Aug 5, 2014 at 8:23 AM, Zachary Ware wrote: > > which it should be if the most recently > installed Python was 3.3 or 3.4, installed with default options. > And there we have my problem with this glorious new "feature". YOU CAN'T RELY ON IT, because it depends on the most recent version

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Zachary Ware
On Tue, Aug 5, 2014 at 9:56 AM, Marc Tompkins wrote: > On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel > wrote: >> I think this is because on windows, *.py files are associated with py.exe >> that choose the python version depending on the first line of your file. > > No. *ix operating systems

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Mark Lawrence
On 05/08/2014 15:56, Marc Tompkins wrote: On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel wrote: I think this is because on windows, *.py files are associated with py.exe that choose the python version depending on the first line of your file. No. *ix operating systems (Unix, Linux, OS X, et

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Marc Tompkins
On Tue, Aug 5, 2014 at 12:48 AM, Maxime Steisel wrote: > I think this is because on windows, *.py files are associated with py.exe > that choose the python version depending on the first line of your file. No. *ix operating systems (Unix, Linux, OS X, etc.) inspect the first line of a file to de

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Ben Finney
Greg Markham writes: > For cmd line, yes that's basically it. When I say "shell", I'm > referring to the Python IDLE GUI. For future reference: the operating system shell presents a command line. The Python shell presents a command line. So “shell” and “command line” don't distinguish between th

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Maxime Steisel
Le 2014-08-05 02:07, "Greg Markham" a écrit: > Ok, when I try this from the Shell window, it works. When executing the full program from command line, it does not. Python versions from both shell and command line are 3.4.1 (confirmed via command: "python -V"). > > Full error msg output when run

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Greg Markham
On Mon, Aug 4, 2014 at 7:38 PM, Steven D'Aprano wrote: > On Mon, Aug 04, 2014 at 04:44:46PM -0700, Greg Markham wrote: > > > Ok, when I try this from the Shell window, it works. When executing the > > full program from command line, it does not. Python versions from both > > shell and command

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-05 Thread Greg Markham
On Mon, Aug 4, 2014 at 5:13 PM, Alan Gauld wrote: > On 05/08/14 00:21, Greg Markham wrote: > > but I'm running into a syntax error >> > > As others have said you are getting the expected error when running Python > v3 code under Python v2. > > How exactly are you running the program? It

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Steven D'Aprano
On Mon, Aug 04, 2014 at 04:44:46PM -0700, Greg Markham wrote: > Ok, when I try this from the Shell window, it works. When executing the > full program from command line, it does not. Python versions from both > shell and command line are 3.4.1 (confirmed via command: "python -V"). I'm a little

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Alan Gauld
On 05/08/14 00:21, Greg Markham wrote: but I'm running into a syntax error As others have said you are getting the expected error when running Python v3 code under Python v2. How exactly are you running the program? It looks like somehow you are picking up Python v2 when you run the

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
On Mon, Aug 4, 2014 at 11:52 AM, Joel Goldstick wrote: > On Mon, Aug 4, 2014 at 1:28 PM, Greg Markham > wrote: > > Hello, > > > > I'm extremely new to Python having only just started learning this week. > > I'm slowly plodding through a book, Python Programming for the Absolute > > Beginner, 3rd

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
On Mon, Aug 4, 2014 at 12:37 PM, Alex Kleider wrote: > On 2014-08-04 10:28, Greg Markham wrote: > >> Hello, >> >> I'm extremely new to Python having only just started learning this week. >> I'm slowly plodding through a book, Python Programming for the Absolute >> Beginner, 3rd ed >>

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Cameron Simpson
On 04Aug2014 13:38, Danny Yoo wrote: > difference between the version of Python I'm using (3.4.1) and that which > was in use at the time the book was written (3.1.x) that is responsible > for this error. Just to double check: how are you confirming what version of Python you're using? In pa

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Danny Yoo
> > but I'm running into a syntax error when running one of the unmodified > > programs. On line 14, which reads: > > > > print("Here", end=" ") > > > > I'm receiving a syntax error which points to the end parameter. I'd like to also support Joel's suggestion to provide detailed output of the err

Re: [Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Joel Goldstick
On Mon, Aug 4, 2014 at 1:28 PM, Greg Markham wrote: > Hello, > > I'm extremely new to Python having only just started learning this week. > I'm slowly plodding through a book, Python Programming for the Absolute > Beginner, 3rd ed by Michael Dawson. > > Code is provided for all the scripts found t

[Tutor] New to Python - print function - invalid syntax

2014-08-04 Thread Greg Markham
Hello, I'm extremely new to Python having only just started learning this week. I'm slowly plodding through a book, Python Programming for the Absolute Beginner, 3rd ed

Re: [Tutor] New to Python

2014-05-04 Thread Alan Gauld
On 28/04/14 13:56, Jordan Smallwood wrote: I never got a response. Should I check my spam? Probably, although Dave and I both basically said the same as the current batch of answers. Namely the exercise is pretty clear: write a module with 2 functions. Now, what part of that specifically do

Re: [Tutor] New to Python

2014-05-04 Thread Jordan Smallwood
I never got a response. Should I check my spam? Sent from my iPhone > On Apr 28, 2014, at 1:57 AM, Mark Lawrence wrote: > >> On 26/04/2014 23:53, jordan smallwood wrote: >> Hello, >> >> I am new to Python. I mean completely new and we're working on this >> problem set in class where they give

Re: [Tutor] New to Python

2014-04-28 Thread Steven D'Aprano
On Sat, Apr 26, 2014 at 03:53:33PM -0700, jordan smallwood wrote: > Hello, > > I am new to Python. I mean completely new and we're working on this > problem set in class where they give us specs and we have to build > something based off these specs. I have no idea what they're asking. > Could

Re: [Tutor] New to Python

2014-04-28 Thread Danny Yoo
Hi Jordan, You probably want to read up to chapter 3 (including the "Functions" chapter) in "How to Think Like a Computer Scientist": http://www.greenteapress.com/thinkpython/html/index.html or some equivalent tutorial, so that you at least know what the terms in the problem statement means.

Re: [Tutor] New to Python

2014-04-28 Thread R. Alan Monroe
> 1. Write a program module with at least two functions. Hint: "def" is the Python keyword used to define a function. You can read all about def in the docs on python.org. Alan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscripti

Re: [Tutor] New to Python

2014-04-28 Thread Mark Lawrence
On 26/04/2014 23:53, jordan smallwood wrote: Hello, I am new to Python. I mean completely new and we're working on this problem set in class where they give us specs and we have to build something based off these specs. I have no idea what they're asking. Could someone help get me started on the

[Tutor] New to Python

2014-04-28 Thread jordan smallwood
Hello, I am new to Python. I mean completely new and we're working on this problem set in class where they give us specs and we have to build something based off these specs. I have no idea what they're asking. Could someone help get me started on the path to figuring this out? Below is the qu

Re: [Tutor] New to programing and the tutoring system

2013-07-18 Thread Alan Gauld
On 16/07/13 15:15, Samuel Kroger wrote: guess it, it is very simple but for some reason it only works when it's in idle. What doesn't work? Do you get any output? An error message? How are you running it outside IDLE? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

[Tutor] New to programing and the tutoring system

2013-07-18 Thread Samuel Kroger
Hello I am very very new to programing entirely, I have this book I am following, and I made a word jumbling game, it chooses a word from random from a turple I made, then scrambles the word and asks you to guess it, it is very simple but for some reason it only works when it's in idle. Here is the

Re: [Tutor] New Python 3.3.2 Install Fails to Start-Up

2013-07-10 Thread Marc Tompkins
On Wed, Jul 10, 2013 at 10:27 AM, Alan Gauld wrote: > On 08/07/13 06:43, Nathan Schlaffer wrote: > > Second, I tried to run my Python programs today via IDLE but when I >> checked the Edit Menu I couldn't find a Run Menu >> > > IDLE has two modes: Shell and Edit. Shell mode is an interactive P

Re: [Tutor] New Python 3.3.2 Install Fails to Start-Up

2013-07-10 Thread Alan Gauld
On 08/07/13 06:43, Nathan Schlaffer wrote: I have a Windows 7 Laptop. I installed Python Version 3.3.2 this morning and it worked fine. Then I tried to run a program someone else wrote (see below) I didn't see anything related below. What program did you try to run? How did you try to run it?

Re: [Tutor] New Python 3.3.2 Install Fails to Start-Up

2013-07-10 Thread Dave Angel
On 07/08/2013 01:43 AM, Nathan Schlaffer wrote: Dear Tutor, I have a Windows 7 Laptop. I installed Python Version 3.3.2 this morning and it worked fine. Then I tried to run a program someone else wrote (see below), and Python closed. What's that mean? HOW did you try to run the other program?

[Tutor] New Python 3.3.2 Install Fails to Start-Up

2013-07-10 Thread Nathan Schlaffer
Dear Tutor, I have a Windows 7 Laptop. I installed Python Version 3.3.2 this morning and it worked fine. Then I tried to run a program someone else wrote (see below), and Python closed. Then I couldn't get Python to restart even after rebooting several times. I then uninstalled Python, rebooted, c

[Tutor] New book: Data Structures and Algorithms in Python. Opinions?

2013-04-30 Thread boB Stepp
The following textbook was just released yesterday on Amazon: Data Structures and Algorithms in Python Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser March 2013, ©2013 I was wondering if anyone was familiar with the earlier "market leading" textbooks in C++ and Java with essentiall

Re: [Tutor] new to threading, Queues

2013-04-18 Thread Jordan
On 04/18/2013 02:16 AM, Chuck Mayers wrote: Hi! I was having a bit of nostalgia today, and thought I'd try to write a simple, old school BBS. I found the 'paramiko' library, and I've got something I can SSH into that would have impressed my 1990's self. I found some example code of the "th

[Tutor] new to threading, Queues

2013-04-17 Thread Chuck Mayers
Hi! I was having a bit of nostalgia today, and thought I'd try to write a simple, old school BBS. I found the 'paramiko' library, and I've got something I can SSH into that would have impressed my 1990's self. I found some example code of the "threading" library, and I've managed to use it to ta

Re: [Tutor] New Programmer - Designing

2013-03-08 Thread Alan Gauld
On 08/03/13 03:14, Christopher Emery wrote: I am new to this email list as can see from subject, my name is Christopher. Hi, welcome. I am trying to learn how to design a program but I seem not to find any resource online that will teach how to design the program before you start programming

  1   2   3   4   5   >