Re: [Tutor] Installing twisted

2014-11-27 Thread Scott W Dunning
Hey guys I was hoping someone could tell me how to opted out of this list? I have it going to two email addresses for some reason and I unsubscribed but nothing happened. Any help is greatly appreciated! Thanks, Scott ___ Tutor maillist -

Re: [Tutor] Final review

2014-05-07 Thread Scott W Dunning
On May 5, 2014, at 10:13 PM, meenu ravi meenurav...@gmail.com wrote: Likewise, the index of d, which is the last word in the word Hello world is 10. So, the maximum index you can access in the word Hello world is 10. But when you try to give the command, greeting [len(greeting)]

Re: [Tutor] Final review

2014-05-05 Thread Scott W Dunning
On May 1, 2014, at 5:30 AM, Steven D'Aprano st...@pearwood.info wrote: Awesome, thanks everyone! I understand lists a lot better now. I have another question. I don’t understand why below would give an error? greeting = 'Hello World’ greeting [len(greeting)]

[Tutor] Final review

2014-05-01 Thread Scott W Dunning
Hello, I am new to python and have a final review coming up and was hoping you could help me answer a few questions I came across while studying. So, I get a little confused about lists sometimes. This one is a little hard to make heads or tails of. I get confused about how to tell how many

Re: [Tutor] exercise (while loop)

2014-04-01 Thread Scott W Dunning
On Mar 31, 2014, at 7:10 PM, Danny Yoo d...@hashcollision.org wrote: Thanks for the info Danny! I’ll try that and I should be able to figure it out with your help! The book I was referring to is greentreepress. ___ Tutor maillist -

[Tutor] exercise (while loop)

2014-03-31 Thread Scott W Dunning
I’m working on a few exercises and I’m a little stuck on this one. This is what the book has but it just gives me an endless loop. def square_root(a, eps=1e-6): while True: print x y = (x + a/x) / 2 if abs(y-x) epsilon:

[Tutor] while loop

2014-03-29 Thread Scott W Dunning
Hello, I’m working on some practice exercises from my homework and I’m having some issues figuring out what is wanted. We’re working with the while loop and this is what the question states; Write a function print_n that prints a string n times using iteration. Print the string `s`,

Re: [Tutor] while loop

2014-03-28 Thread Scott W Dunning
On Mar 28, 2014, at 9:54 PM, Scott W Dunning scott@cox.net wrote: Hello, I’m working on some practice exercises from my homework and I’m having some issues figuring out what is wanted. We’re working with the while loop and this is what the question states; Write a function print_n

[Tutor] Project suggestions

2014-03-13 Thread Scott W Dunning
Hey Everyone, I just got through doing a Guess-the-number script and was looking for something else to practice on. Do any of you have any suggestions on some things I could work on? Keep in mind I am not only extremely new to python I am new to programming. Thanks for any suggestions!!!

Re: [Tutor] Help with Guess the number script

2014-03-12 Thread Scott W Dunning
On Mar 11, 2014, at 7:50 PM, William Ray Wing w...@mac.com wrote: Simple. In Mail Preferences - Composing - Message Format - Plain Text (Your setting is probably currently Rich Text.) Got it, hopefully that helps. ___ Tutor maillist -

Re: [Tutor] Help with Guess the number script

2014-03-11 Thread Scott W Dunning
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote: Scott W Dunning swdunn...@cox.net Wrote in message: Would you please stop posting in html? I don’t know what you mean? I just use the text for my email provider. It’s not html? I types up the code I had in the script

Re: [Tutor] Help with Guess the number script

2014-03-11 Thread Scott W Dunning
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote: Where are you guys using the forum? Through google? I was using that at first but someone complained about something that google does and told me to get it through my email. That’s what I’m doing now and I get bombarded with

Re: [Tutor] Help with Guess the number script

2014-03-11 Thread Scott W Dunning
On Mar 11, 2014, at 1:49 AM, Alan Gauld alan.ga...@btinternet.com wrote: Not from the tutor list though. It only has a few mails normally - less than 50 most days. Actually now that you say that most of the emails are coming through the reg python-lists, not the tutor section. I guess I

Re: [Tutor] Help with Guess the number script

2014-03-10 Thread Scott W Dunning
On Mar 8, 2014, at 7:29 AM, eryksun eryk...@gmail.com wrote: i.e. guess 1 or guess 100 becomes not not (guess 1 or guess 100) Why a not not? Wouldn’t that just be saying do this because the second not is undoing the first? distribute over the disjunction not (not

Re: [Tutor] Help with Guess the number script

2014-03-10 Thread Scott W Dunning
On Mar 8, 2014, at 7:35 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: I have no interest in the efficiency, only what is easiest for me to read, which in this case is the chained comparison. As a rule of thumb I'd also prefer it to be logically correct :) What exactly is ment by a

Re: [Tutor] Help with Guess the number script

2014-03-10 Thread Scott W Dunning
On Mar 10, 2014, at 4:15 AM, eryksun eryk...@gmail.com wrote: Different strokes for different folks. I like to tinker with and disassemble things as I'm learning about them. I would have been ecstatic about open source as a kid. I learn simultaneously from the top down and bottom up --

Re: [Tutor] Help with Guess the number script

2014-03-10 Thread Scott W Dunning
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com wrote: Well done. And now that you have the right set of tests you can half the number of lines by combining your if conditions again, like you had in the original post. ie. Bring your hot/cold/warm tests together. So below is what I

Re: [Tutor] Python implementations (was: Help with Guess the number script)

2014-03-10 Thread Scott W Dunning
On Mar 10, 2014, at 8:52 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: What does the Python interactive prompt display when you first launch an interactive Python shell? Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type

Re: [Tutor] Python implementations (was: Help with Guess the number script)

2014-03-10 Thread Scott W Dunning
On Mar 10, 2014, at 8:52 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: What does the Python interactive prompt display when you first launch an interactive Python shell? Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type

Re: [Tutor] Help with Guess the number script

2014-03-10 Thread Scott W Dunning
On Mar 8, 2014, at 11:50 AM, Scott dunning swdunn...@cox.net wrote: And now that you have the right set of tests you can half the number of lines by combining your if conditions again, like you had in the original post. ie. Bring your hot/cold/warm tests together. I’m having a hard time

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!

[Tutor] Help with Guess the number script

2014-03-07 Thread Scott W Dunning
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 greatly appreciated!

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

[Tutor] Help with Guess the number script

2014-02-28 Thread Scott W Dunning
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 could help me out I’d greatly appreciate it! Also,

Re: [Tutor] Function help

2014-02-24 Thread Scott W Dunning
On Feb 23, 2014, at 5:31 AM, Dave Angel da...@davea.name wrote: Welcome to the tutor forum also, Scott. You'll find it works very similarly to python-list, and has many of the same people on it. I'm not sure how you tried to attach source, but please be aware that this is a text list -

Re: [Tutor] Function help

2014-02-24 Thread Scott W Dunning
On Feb 23, 2014, at 2:26 AM, Peter Otten __pete...@web.de wrote a programmer would think for loop” immediately That’s what I thought. It just seemed like way to much to keep repeating everything over and over. I knew there had to be a better way we just haven’t learned loops in school yet.

Re: [Tutor] Function help

2014-02-24 Thread Scott W Dunning
On Feb 23, 2014, at 2:26 AM, Peter Otten __pete...@web.de wrote: If you want to make rows with more or less stars, or stars in other colors you could add parameters: def star_row(numstars, starcolor): for i in range(numstars): fillstar(starcolor) space(25) Your code

Re: [Tutor] Function help

2014-02-24 Thread Scott W Dunning
On Feb 23, 2014, at 2:26 AM, Peter Otten __pete...@web.de wrote: which still shows a repetetive pattern and thus you can simplify it with another loop. You should be able to find a way to write that loop with two star_row() calls on a single iteration, but can you do it with a single call

[Tutor] Function help

2014-02-23 Thread Scott W Dunning
I am VERY new to python (programming too). I had a question regarding functions. Is there a way to call a function multiple times without recalling it over and over. Meaning is there a way I can call a function and then add *5 or something like that? I am trying to code an American Flag

[Tutor] help with regexps/filename parsing

2005-01-31 Thread Scott W
Hey all. I've got an issue that's been driving me a bit nuts. I'm sure it _can_ be done with a regexp, although I'm missing a piece needed to tie it together to work for all cases. I need to parse out a list of RPMs in this case, but it seems the RPM naming convention has changed, as there

Re: [Tutor] help with regexps/filename parsing

2005-01-31 Thread Scott W
Slight correction which I realized after sending, see below for version/release seperation, which I should have seen but blame lack of sleep ;-) Scott W wrote: Hey all. I've got an issue that's been driving me a bit nuts. I'm sure it _can_ be done with a regexp, although I'm missing a piece

[Tutor] Changing (Unix) environment for python shell/popen() commands

2005-01-23 Thread Scott W
Hey all. I'm unfortunately stuck using python 1.5.2, primarily on Linux currently, and have done the usual searching (on list, active state, google), without luck. I've got to shell out from my python code to execute a command, but _must_ set the environment at the same time (or prior to

[Tutor] replacement for constants from other languages in Python?

2005-01-06 Thread Scott W
Hey all, I've done the usual googling, checked the Learning Python book and did some list searches, to no avail as of yet. I'm _very_ used to using C style constants (preprocessor #define directives) or C++ const keyword style, for a variety of reasons. I've yet to see anything covering 'how

Re: [Tutor] replacement for constants from other languages in Python?

2005-01-06 Thread Scott W
Kent Johnson wrote: Scott W wrote: The 'need' to define a global constant in an imported module, for example- (I know about sys.version_info, but it doesn't exist in 1.5.2...don't ask ;-) I also know this could be handled via a class, but what is the equivalent of the following snippets