Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Scott W Dunning
On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! This is what I got, not sure if it’s correct but it’s working! def print_hints(secret, guess): if guess 1 or guess 100: print print Out of range!

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Alan Gauld
On 08/03/14 01:23, Scott W Dunning wrote: On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! This is what I got, not sure if it’s correct but it’s working! Well done. And now that you have the right set of tests you can

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread spir
On 03/08/2014 10:13 AM, Alan Gauld wrote: On 08/03/14 01:23, Scott W Dunning wrote: On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! This is what I got, not sure if it’s correct but it’s working! Well done. And now

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Mark Lawrence
On 08/03/2014 01:23, Scott W Dunning wrote: On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! If at first you don't succeed... :) This is what I got, not sure if it’s correct but it’s working! def

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Dave Angel
Mark Lawrence breamore...@yahoo.co.uk Wrote in message: On 08/03/2014 01:23, Scott W Dunning wrote: def print_hints(secret, guess): if guess 1 or guess 100: Only now do I feel that it's time to point out that the above line would probably be written by an experienced Python

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread eryksun
On Sat, Mar 8, 2014 at 8:36 AM, Dave Angel da...@davea.name wrote: Mark Lawrence breamore...@yahoo.co.uk Wrote in message: On 08/03/2014 01:23, Scott W Dunning wrote: def print_hints(secret, guess): if guess 1 or guess 100: Only now do I feel that it's time to point out that the

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Mark Lawrence
On 08/03/2014 14:29, eryksun wrote: Anyway, you needn't go out of your way to rewrite the expression using a chained comparison. The disjunctive expression is actually implemented more efficiently by CPython's compiler, which you can verify using the dis module to disassemble the bytecode. I

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Scott dunning
On Mar 8, 2014, at 6:36 AM, Dave Angel da...@davea.name wrote: Mark Lawrence breamore...@yahoo.co.uk Wrote in message: On 08/03/2014 01:23, Scott W Dunning wrote: def print_hints(secret, guess): if guess 1 or guess 100: Only now do I feel that it's time to point out that the

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Scott dunning
On Mar 8, 2014, at 6:26 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 08/03/2014 01:23, Scott W Dunning wrote: On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! If at first you don't succeed... :)

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread Scott dunning
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com wrote: On 03/08/2014 10:13 AM, Alan Gauld wrote: On 08/03/14 01:23, Scott W Dunning wrote: On Mar 7, 2014, at 11:02 AM, Alan Gauld alan.ga...@btinternet.com wrote: GOT IT!! Finally! Thanks for all of your help!! This is what I

Re: [Tutor] Help with Guess the number script

2014-03-08 Thread eryksun
On Sat, Mar 8, 2014 at 1:44 PM, Scott dunning swdunn...@cox.net wrote: if 1 guess 100: OH! I see what you're saying, ignore my last post. Yes that looks cleaner. Please read section 6.9 of the language reference, which defines Python comparison expressions.

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread Danny Yoo
Can you split the conditions so that they're not overlapping? One of the things that you learn about programming is that if the program is hard for humans to read, even if the program is computing something useful, you may want to work to make it humanly understandable, even if the human is

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread Ben Finney
Scott W Dunning swdunn...@cox.net writes: I am trying to write a script for class for a game called guess the number. I’m almost done but, I’m having a hard time getting the hints to print correctly. I’ve tried ‘if’’ ‘elif’ nested, it seems like everything…. And, what happens? Please

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread Danny Yoo
One more note: I used round parenthesis in the diagrams above to indicate intervals. If you think about it a bit, you'll realize I should be using square brackets in some places, or make some distinctive graphic. Open and closed circles, perhaps? Otherwise, there are tiny pinpoint gaps in the

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread Peter Otten
Scott W Dunning wrote: I am trying to write a script for class for a game called guess the number. I’m almost done but, I’m having a hard time getting the hints to print correctly. I’ve tried ‘if’’ ‘elif’ nested, it seems like everything….I’m posting my code for the hints below, any help is

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread spir
On 03/07/2014 06:30 AM, Scott W Dunning wrote: I am trying to write a script for class for a game called guess the number. I’m almost done but, I’m having a hard time getting the hints to print correctly. I’ve tried ‘if’’ ‘elif’ nested, it seems like everything….I’m posting my code for the

Re: [Tutor] Help with Guess the number script

2014-03-07 Thread Alan Gauld
On 07/03/14 05:30, Scott W Dunning wrote: I am trying to write a script for class for a game called guess the number. Others have given general hints here are a couple of specifics... def print_hints(secret, guess): if guess 1 or guess 101: As I recall the spec said guesses could be

Re: [Tutor] Help with Guess the number script

2014-03-04 Thread Danny Yoo
Once a function gets beyond about six or seven lines long, it's a bit hard to read, and harder to get the indentation right. You're having difficulty with the indentation, but that's often a sign that the function is too big to read comfortably. Can you break the function down into a few pieces?

Re: [Tutor] Help with Guess the number script

2014-03-04 Thread Danny Yoo
If not, then you might even try something like: # def maybe_print_cold(): if guess (secret - 10) or guess (secret - 10): print You are cold! print print Please play again!” # ... Ooops. You probably need to

Re: [Tutor] Help with Guess the number script

2014-03-04 Thread Alan Gauld
On 04/03/14 02:29, Scott W Dunning wrote: I’ve made some changes and have a couple questions, I’ll speak in between the code. from random import randrange randrange(1, 101) This call to randrange() doesn't do anything because you don't store the return value. You need to create a variable

Re: [Tutor] Help with Guess the number script

2014-03-03 Thread Ben Finney
Scott W Dunning swdunn...@cox.net writes: This is what Im having trouble with now. Here are the directions I’m stuck on and what I have so far, I’ll bold the part that’s dealing with the instructions if anyone could help me figure out where I’m going wrong. “Bold” assumes that markup of text

Re: [Tutor] Help with Guess the number script

2014-03-03 Thread spir
On 03/03/2014 05:03 AM, Scott W Dunning wrote: Ben Finney makes numerous fine comments already. I'll add a few, some on the same points but but expressed a bit differently (case it helps). This is what Im having trouble with now. Here are the directions I’m stuck on and what I have so far,

Re: [Tutor] Help with Guess the number script

2014-03-02 Thread Dave Angel
Scott W Dunning swdunn...@cox.net Wrote in message: On Mar 1, 2014, at 12:47 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: You've bound the name ‘current_guess’ to the user's input, but then do nothing with it for the rest of the function; it will be discarded without being used.

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Dave Angel
Scott W Dunning swdunn...@cox.net Wrote in message: In addition to Ben's observation, you don't use anything random when initializing secret. And you don't store the result of get_guess. -- DaveA ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread spir
On 03/01/2014 07:46 AM, Scott W Dunning wrote: Hello, i am working on a project for learning python and I’m stuck. The directions are confusing me. Please keep in mind I’m very ne to this. The directions are long so I’ll just add the paragraphs I’m confused about and my code if someone

Re: [Tutor] Help with Guess the Number script

2014-03-01 Thread Mark Lawrence
On 01/03/2014 06:05, Scott Dunning wrote: In addition to the answers you've already had, I suggest that you learn to run code at the interactive prompt, it's a great way of seeing precisely what snippets of code actually do. Also use the print statement in Python 2 or print function in

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Alan Gauld
Scott W Dunning swdunn...@cox.net writes: def get_guess(guess_number): print (,guess_number,)Plese enter a guess: Aren't you missing a comma before the last string? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Alan Gauld
On 01/03/14 17:16, Alan Gauld wrote: Scott W Dunning swdunn...@cox.net writes: def get_guess(guess_number): print (,guess_number,)Plese enter a guess: Aren't you missing a comma before the last string? I just realized it will work because Python auto joins adjacent string literals.

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 12:47 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: You've bound the name ‘current_guess’ to the user's input, but then do nothing with it for the rest of the function; it will be discarded without being used. Hmm, I’m not quite sure I understand. I got somewhat

Re: [Tutor] Help with Guess the Number script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 8:57 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 01/03/2014 06:05, Scott Dunning wrote: In addition to the answers you've already had, I suggest that you learn to run code at the interactive prompt, it's a great way of seeing precisely what snippets of code

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Scott W Dunning
On Mar 1, 2014, at 6:53 AM, spir denis.s...@gmail.com wrote: I find directions very confusing. Also, they completely control you while explaining about nothing, like a user manual saying press this, turn that. This is inappropriate for programming (and anything else): you need to

Re: [Tutor] Help with Guess the number script

2014-03-01 Thread Ben Finney
Scott W Dunning swdunn...@cox.net writes: On Mar 1, 2014, at 12:47 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: You've bound the name ‘current_guess’ to the user's input, but then do nothing with it for the rest of the function; it will be discarded without being used. Hmm, I’m not

Re: [Tutor] Help with Guess the number script

2014-02-28 Thread Ben Finney
Scott W Dunning swdunn...@cox.net writes: def get_guess(guess_number): print (,guess_number,)Plese enter a guess: current_guess = raw_input() return int(guess_number) You've bound the name ‘current_guess’ to the user's input, but then do nothing with it for the rest of the

Re: [Tutor] help me

2014-02-02 Thread hind fathallah
thank you so much because I got it :)  On Saturday, February 1, 2014 1:28 PM, Danny Yoo d...@hashcollision.org wrote: On Fri, Jan 31, 2014 at 8:55 PM, hind fathallah hind_fathal...@yahoo.com wrote: hi can you answer this question for me plz [question omitted] Many of us probably could

Re: [Tutor] help me

2014-02-01 Thread Mark Lawrence
On 01/02/2014 04:55, hind fathallah wrote: hi can you answer this question for me plz Modify the Guess My number program from this chapter so that the player has only five guesses. If the player run out of guess, the program should end the game and display an appropriately chastising message.

Re: [Tutor] help me

2014-02-01 Thread Danny Yoo
On Fri, Jan 31, 2014 at 8:55 PM, hind fathallah hind_fathal...@yahoo.com wrote: hi can you answer this question for me plz [question omitted] Many of us probably could answer this. But this is not a homework-answering mailing list. The problem itself is not interesting to us. What is

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Peter Otten
Ahmed, Shakir wrote: I am trying to insert a record in the access table, the value has a quote and could not insert the record. Any idea how I can insert records like this quotes. cursor.execute(INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's Harbor.JPG')) Traceback (most recent

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Mark Lawrence
On 29/01/2014 16:46, Peter Otten wrote: Ahmed, Shakir wrote: I am trying to insert a record in the access table, the value has a quote and could not insert the record. Any idea how I can insert records like this quotes. cursor.execute(INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Ahmed, Shakir
Thanks, it worked exactly what I was trying to do so. -Original Message- From: Tutor [mailto:tutor-bounces+shahmed=sfwmd@python.org] On Behalf Of Peter Otten Sent: Wednesday, January 29, 2014 11:47 AM To: tutor@python.org Subject: Re: [Tutor] help with data insert into Access table

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Keith Winston
On Wed, Jan 29, 2014 at 12:11 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: I think it's worth pointing out that there is a difference here between the OP's 'Site Name's Harbor.JPG' and Peter's Site Name's Harbor.JPG. Left as homework for the newbies :) I'll bite. But are you just

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Mark Lawrence
On 29/01/2014 19:47, Keith Winston wrote: On Wed, Jan 29, 2014 at 12:11 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: I think it's worth pointing out that there is a difference here between the OP's 'Site Name's Harbor.JPG' and Peter's Site Name's Harbor.JPG. Left as homework for the

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread Keith Winston
On Wed, Jan 29, 2014 at 3:03 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Nothing to do with tuples. Tools such as syntax checkers or MkI eyeballs come in useful here. Although such tools probably won't pick up the incorrect spelling of harboUr :) Alas, now I'm more confused. I don't see

Re: [Tutor] help with data insert into Access table

2014-01-29 Thread eryksun
On Wed, Jan 29, 2014 at 3:53 PM, Keith Winston keithw...@gmail.com wrote: I had the impression that Peter was employing tuples because, as an immutable type, it couldn't inadvertently/inauspiciously be changed by a user Per footnote 5 of PEP 249, the parameters need to be in a type that

Re: [Tutor] help

2014-01-09 Thread Steven D'Aprano
On Thu, Jan 09, 2014 at 09:52:04AM +0100, Tihomir Zjajic wrote: Please, can you help me convert this code from python 3 to python 2.6 Change input() to raw_input(). That will make it compatible with Python 2.6. But that is not the cause of the error you get. The error that you get is that your

Re: [Tutor] help

2014-01-09 Thread Alan Gauld
On 09/01/14 08:52, Tihomir Zjajic wrote: Please, can you help me convert this code from python 3 to python 2.6 The main gotchas are that 1) input in Python 3 - raw_input() in Python 2 2) print (XXX) in Python 3 - print XXX in Python 2 Start from there then read any error messages and fix as

Re: [Tutor] Help with python

2013-12-02 Thread Mark Lawrence
On 02/12/2013 22:33, Blake wrote: I'm writing a program to calculate totals and change for a menu, and I'm having a few issues. If you could help me, it would be greatly appreciated. A little more data would help :) Some code, the OS and Python versions and the precise nature of the

Re: [Tutor] Help with python

2013-12-02 Thread Steven D'Aprano
On Mon, Dec 02, 2013 at 04:33:27PM -0600, Blake wrote: I'm writing a program to calculate totals and change for a menu, and I'm having a few issues. If you could help me, it would be greatly appreciated. Would you like us to guess what issues you are having? Let me look into my crystal

Re: [Tutor] Help merge files using python

2013-11-15 Thread Peter Otten
jarod...@libero.it wrote: Hi I want to merge many files like this: #file1 A 10 B 20 C 30 #file2 B 45 Z 10 #file1 A 60 B 70 C 10 I want to obtain A 10 0 60 B 20 45 70 C 30 0 10 Z 0 10 0 I try to do like this: f = os.listdir(.) for i in f:

Re: [Tutor] Help merge files using python

2013-11-13 Thread Amit Saha
On Thu, Nov 14, 2013 at 8:26 AM, jarod...@libero.it jarod...@libero.it wrote: Hi I want to merge many files like this: #file1 A 10 B 20 C 30 #file2 B 45 Z 10 #file1 A 60 B 70 C 10 I want to obtain A 10 0 60 B 20 45 70 C 30 0 10 Z 0

Re: [Tutor] Help merge files using python

2013-11-13 Thread Alan Gauld
On 13/11/13 22:26, jarod...@libero.it wrote: I want to obtain A 10 0 60 B 20 45 70 C 30 0 10 Z 0 10 0 Amit has given you a design to solve the problem, however based on your code you may not be able to translate that into code yet. I try to do like this: f = os.listdir(.) for i in f: T

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/30/2013 10:00 PM, Carmen Salcedo wrote: Hi Everyone, hi some guidelines for this list. post in plain text not html. tell us what version of Python you are using, what OS, what you use to edit and run the program. when replying: reply-all so a copy goes to the list put

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/31/2013 6:49 AM, Carmen Salcedo wrote: Hi, I'm using python 2.7. I'm editing the program with idle. I use windows 8. I finally got the string to convert to integers, however I can't figure out how to print them in this phone number format555-5678 tel:555-5678. The numbers are

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/31/2013 7:52 AM, Carmen Salcedo wrote: I'm not able to post it right now. All I did to the previous program i emailed was changed isalpha() to str.isalpha. That does agree with what you posted or got. The part of your original program that should print a character already is print

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Mark Lawrence
On 31/10/2013 02:00, Carmen Salcedo wrote: Hi Everyone, I hope you're having a great week. I'm working on this program that converts strings to integers. Can someone please help me out? :) Below is the program: def main(): selection = input(Enter you choice. Enter 1 +

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/31/2013 10:11 AM, Carmen Salcedo wrote: Thanks Bob! :) A list is great idea. I'm just trying to figure out how to print the number across like a phone number 555- instead of downward. I'm stuck on that. I repeat what I said before: There are many ways to get the desired output.

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/31/2013 10:11 AM, Carmen Salcedo wrote: I'm just trying to figure out how to print the number across like a phone number 555- instead of downward. I'm stuck on that. On further thought: print %s%s%s-%s%s%s%s % tuple(numberList) The % operator does formatting. Each %s is replaced

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Carmen Salcedo
I'm not able to post it right now. All I did to the previous program i emailed was changed isalpha() to str.isalpha. Thanks Sent from my iPhone On Oct 31, 2013, at 7:09 AM, bob gailer bgai...@gmail.com wrote: On 10/31/2013 6:49 AM, Carmen Salcedo wrote: Hi, I'm using python 2.7. I'm

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Carmen Salcedo
Hi, I'm using python 2.7. I'm editing the program with idle. I use windows 8. I finally got the string to convert to integers, however I can't figure out how to print them in this phone number format 555-5678. The numbers are printing out this way. 5 5 5 5 6 Thank you very much. :) Carmen

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Carmen Salcedo
Thanks Bob! :) A list is great idea. I'm just trying to figure out how to print the number across like a phone number 555- instead of downward. I'm stuck on that. 5 5 5 Thanks again! Carmen Sent from my iPhone On Oct 31, 2013, at 9:02 AM, bob gailer bgai...@gmail.com wrote: On

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Carmen Salcedo
Hi Mark, Thanks for the feedback. I figured it out. Yes, I'm using python 2.7 (typo in the last email). Have a great day. Sent from my iPhone On Oct 31, 2013, at 10:44 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 31/10/2013 02:00, Carmen Salcedo wrote: Hi Everyone, I hope you're

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Carmen Salcedo
Thanks Bob! :) I'm very new at programming in Python. I appreciate your feedback. Have a great week! Sent from my iPhone On Oct 31, 2013, at 1:07 PM, bob gailer bgai...@gmail.com wrote: On 10/31/2013 10:11 AM, Carmen Salcedo wrote: Thanks Bob! :) A list is great idea. I'm just trying to

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread bob gailer
On 10/31/2013 2:51 PM, Carmen Salcedo wrote: Thanks Bob! :) I'm very new at programming in Python. I appreciate your feedback. Here are some improvements to consider: import string def main(): d = {1 : phoneTranslator, 2 : backwardString} # map user selection to corresponding function

Re: [Tutor] Help with converting a string into a integer

2013-10-31 Thread Mark Lawrence
On 01/11/2013 02:36, bob gailer wrote: On 10/31/2013 2:51 PM, Carmen Salcedo wrote: Thanks Bob! :) I'm very new at programming in Python. I appreciate your feedback. Here are some improvements to consider: import string def main(): d = {1 : phoneTranslator, 2 : backwardString} # map

Re: [Tutor] Help please

2013-10-17 Thread Todd Matsumoto
Hello Ruben, You might already know this, but the Python documentation will get you pretty far: http://www.python.org/doc/ Here are some things to lookup that may help you solve the problems. On 10/16/2013 08:49 PM, Pinedo, Ruben A wrote: I was given this code and I need to modify it so

Re: [Tutor] Help please

2013-10-17 Thread Alan Gauld
On 16/10/13 19:49, Pinedo, Ruben A wrote: I was given this code and I need to modify it so that it will: #1. Error handling for the files to ensure reading only .txt file I'm not sure what is meant here since your code only ever opens 'emma.txt', so it is presumably a text file... Or are you

Re: [Tutor] Help please

2013-10-17 Thread Peter Otten
Alan Gauld wrote: [Ruben Pinedo] def process_file(filename): hist = dict() fp = open(filename) for line in fp: process_line(line, hist) return hist def process_line(line, hist): line = line.replace('-', ' ') for word in line.split(): word =

Re: [Tutor] Help please

2013-10-17 Thread Dominik George
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Todd Matsumoto c.t.matsum...@gmail.com schrieb: #1. Error handling for the files to ensure reading only .txt file Look up exceptions. Find out what the string method endswith() does. One should note that the OP probably meant files of the type

Re: [Tutor] Help please

2013-10-17 Thread Kengesbayev, Askar
Ruben, #1 you can try something like this try: with open('my_file.txt') as file: pass except IOError as e: print Unable to open file #Does not exist or you do not have read permission #2. I would try to use regular expression push words to array and then you

Re: [Tutor] Help please

2013-10-17 Thread Alan Gauld
On 17/10/13 14:37, Peter Otten wrote: Alan Gauld wrote: [Ruben Pinedo] def process_file(filename): hist = dict() fp = open(filename) for line in fp: process_line(line, hist) return hist or somebody is just sloppy. But neither work as expected right now. (Hint:

Re: [Tutor] Help Beginning

2013-10-08 Thread Alan Gauld
On 08/10/13 17:41, Connor Moody wrote: Im having trouble finding a website that simply teaches it. There is a page at python.org for complete beginners. One thing to watch is which version of Python you use. Some tutorials are written for Python v2 others for v3, and although similar they

Re: [Tutor] HELP I need help with Python Setup or to reach Marilyn Davis

2013-10-03 Thread Chris Down
On 2013-10-02 19:01, carolynn fryer wrote: I am at the point where I am just spinning my wheels.  I tried to get help with logging on but so far I am just getting frustrated.   I have a problem that I brought up the first night in class but couldn't seem to get help then.  Sorry if I am at

Re: [Tutor] HELP I need help with Python Setup or to reach Marilyn Davis

2013-10-03 Thread Dave Angel
On 2/10/2013 22:01, carolynn fryer wrote: the fact that I can not run anything without getting a syntax error.  I tried setting up a path for python environment variables and a few other things but I am getting no where. Welcome to the Python tutor mailing list. I deleted all the

Re: [Tutor] HELP I need help with Python Setup or to reach Marilyn Davis

2013-10-03 Thread Walter Prins
Hi Carolynn, On 3 October 2013 03:01, carolynn fryer carolynn...@yahoo.com wrote: I am at the point where I am just spinning my wheels. I tried to get help with logging on but so far I am just getting frustrated. Please note that you've sent an email regarding what appears to be possibly be

Re: [Tutor] HELP I need help with Python Setup or to reach Marilyn Davis

2013-10-03 Thread David
On 3 October 2013 20:51, Walter Prins wpr...@gmail.com wrote: Hi Carolynn, On 3 October 2013 03:01, carolynn fryer carolynn...@yahoo.com wrote: I am at the point where I am just spinning my wheels. I tried to get help with logging on but so far I am just getting frustrated. Please note

Re: [Tutor] HELP I need help with Python Setup or to reach Marilyn Davis

2013-10-03 Thread Alan Gauld
On 03/10/13 13:58, David wrote: Python installation (?), to a general public mailing list ... ... which has 100's of readers all around the world. Almost 4000... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.flickr.com/photos/alangauldphotos

Re: [Tutor] Help on class

2013-09-27 Thread Dave Angel
On 27/9/2013 10:07, bharath ks wrote: Hello, May i know why object 'c' does not prompt for employee name and employee id in the following code i get out put as  Enter employee name:john Enter employee id:56 Employee name is: john Employee id is: 56

Re: [Tutor] Help on class

2013-09-27 Thread bob gailer
On 9/27/2013 10:07 AM, bharath ks wrote: Hello, Hi welcome to the tutor list. Please post in plain text rather than tiny hard-to-read formatted text. May i know why object 'c' does not prompt for employee name and employee id in the following code You may - see comment below i get out

Re: [Tutor] Help on class

2013-09-27 Thread Steven D'Aprano
On Fri, Sep 27, 2013 at 10:07:39PM +0800, bharath ks wrote: Hello, May i know why object 'c' does not prompt for employee name and employee id in the following code i get out put as  Default values in Python functions and methods are evaluated once only, when the function or method is

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-26 Thread Steven D'Aprano
On Thu, Sep 26, 2013 at 12:24:41AM +0200, Dino Bektešević wrote: Message: 1 and later: Message: 4 I don't suppose you are replying to a message digest, are you? If so, thank you for changing the subject line to something more useful than just Re Digest, and thank you even more for trimming

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-26 Thread David Robinow
On Wed, Sep 25, 2013 at 9:34 PM, Dave Angel da...@davea.name wrote: Clearly gmail isn't showing you all the headers. I looked for Alan's message in one of these threads with the same subject, and see about 60 lines of header information. Does gmail have a View-Source menu item? In gmail the

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dino Bektešević
Hello, I wrote a response on the subject in the title about creating a graph in Python using the Graphics module presented in the standard python tutorial on 23rd detailing full explanations but I still saw repeated responses asking more of the same question (lines causing the error, which

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread eryksun
On Tue, Sep 24, 2013 at 9:15 PM, Dino Bektešević ljet...@gmail.com wrote: original question: http://code.activestate.com/lists/python-tutor/96889/ my response: http://code.activestate.com/lists/python-tutor/96897/ For someone browsing through Tutor in archive form I can see how this is a tad

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dave Angel
On 24/9/2013 21:15, Dino Bektešević wrote: Hello, I wrote a response on the subject in the title about creating a graph in Python using the Graphics module presented in the standard python tutorial on 23rd detailing full explanations but I still saw repeated responses asking more of the

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread znxm0i
Thanks Brian for replying but I already figured out what I was not doing correctlyalso the link you supplied was not what I needed.I had to make the user input statements appear as graphical input boxes and not just text and I figured out how to do it, so it now works like a charm

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dino Bektešević
Message: 1 Date: Wed, 25 Sep 2013 06:29:30 -0400 From: eryksun eryk...@gmail.com To: Dino Bekte?evi? ljet...@gmail.com Cc: tutor@python.org Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart Generate in Python Based on my Code Message-ID: cacl

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dave Angel
Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart Generate in Python Based on my Code Message-ID: l1pt9n$tiq$1...@ger.gmane.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Clearly gmail isn't showing you all the headers. I looked for Alan's message in one

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread eryksun
On Wed, Sep 25, 2013 at 6:24 PM, Dino Bektešević ljet...@gmail.com wrote: Where did you find that In-Reply-To: field? In example Alan's response header Gmail has a Show original link in the message drop-down menu. But in this case I just searched the September text archive:

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread bob gailer
In addition to Alan's comment: Saying it work properly is totally uninformative. Tell us what is happening that you want different. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread School
What is the error you received? What lines does it say are causing the error? Also, this smells like classwork. On Sep 20, 2013, at 21:26, znx...@yahoo.com wrote: Can anyone please help me figure out what I am NOT doing to make this program work properly.PLEASE !! I need to be able to

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread brian arb
http://mcsp.wartburg.edu/zelle/python/ppics1/code/chapter05/futval_graph2.py On Tue, Sep 24, 2013 at 4:36 PM, School northri...@s.dcsdk12.org wrote: What is the error you received? What lines does it say are causing the error? Also, this smells like classwork. On Sep 20, 2013, at 21:26,

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-23 Thread Alan Gauld
On 21/09/13 04:26, znx...@yahoo.com wrote: Can anyone please help me figure out what I am NOT doing to make this program work properly.PLEASE !! First you need to tell us what graphics module you are using since there is no standard library module by that name. Second, you should probably

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code (znx...@yahoo.com)

2013-09-23 Thread Dino Bektešević
Hello, I have attached a copy of the code I've compiled so far. Next time just post the code in here, I think that's the general consensus around here. You should only attach it or use a pastebin if it's really really long. Considering that usually the only valid entries here are snippets of

Re: [Tutor] help with postgreSQL and .csv

2013-09-03 Thread Peter Otten
Ismar Sehic wrote: hello. Ismar, please post in plain text. The markup appears as funny stars over here. i wrote the following code, to insert some values from a csv file to my postgres table : *** *import psycopg2* *conn = psycopg2.connect(host = ***.***.***.*** user=***

Re: [Tutor] help with postgreSQL and .csv

2013-09-02 Thread R. Alan Monroe
my goal is to make it write all the picture url values separated by a ';' in just one field and to input the data correctly.   I haven't used postgresql much. Could it be you're just missing path_picture as part of your data value? i.e. UPDATE hotel SET path_picture = + hotel_url UPDATE hotel

Re: [Tutor] Help Please

2013-07-10 Thread Dave Angel
On 07/05/2013 05:10 PM, Ashley Fowler wrote: HOMEWORK This is what I have so far. Can anyone make suggestions or tell me what I need to correct? * * First thing to correct is the notion that you're due an instant answer. You get frustrated after 3 minutes, and post a

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Antonio Zagheni
To: Antonio Zagheni zagh...@yahoo.com Cc: tutor@python.org tutor@python.org Subject: Re: [Tutor] Help Message-ID:     cacl+1atpo1fduw7yndftnbrdng1pegu4y741te++9rundop...@mail.gmail.com Content-Type: text/plain; charset=UTF-8 On Thu, Jun 20, 2013 at 6:10 PM, Antonio Zagheni zagh...@yahoo.com wrote: I

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Peter Otten
Antonio Zagheni wrote: I am a begginer in Pythonu I did a function that returns a string and I want to copy this to the clipboard. I have tried a lot of suggestions found at Google but nothing works properly. Is there an easy way to do that? I am using Python 2.7 and Windows 7. It's

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Alan Gauld
On 24/06/13 14:34, Antonio Zagheni wrote: But I am trying to paste the clipboard content to MS word and when I do it MS word becomes not responding. OK, so the question is not how to manipulate the clipboard but how to manipulate MS Word. There are multiple ways to approach that. What

Re: [Tutor] Help

2013-06-23 Thread eryksun
On Thu, Jun 20, 2013 at 6:10 PM, Antonio Zagheni zagh...@yahoo.com wrote: I am a begginer in Python. I did a function that returns a string and I want to copy this to the clipboard. I have tried a lot of suggestions found at Google but nothing works properly. Is there an easy way to do

Re: [Tutor] Help with Python in ArcGIS 10.1!

2013-06-23 Thread bob gailer
On 6/17/2013 10:26 AM, Jacobs, Teri (CDC/NIOSH/DSHEFS) (CTR) wrote: Hi, Hi - welcome to the tutor list. Be aware that we are a few volunteers. Your question is one very long line. Please in future ensure it is wrapped so we don't have to scroll. I have wrapped it here. I have a command

<    1   2   3   4   5   6   7   8   9   10   >