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 -
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)]
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)]
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
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 -
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:
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`,
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
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!!!
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 -
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
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
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
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
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
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 --
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
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
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
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
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!
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!
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
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
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
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,
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 -
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.
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
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
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
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
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
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
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
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
36 matches
Mail list logo