Re: [Tutor] writing function changeColor

2012-07-18 Thread Lee Harr
> I learned python so that if I were to put in 0.9, it'd decrease red by 10%.> > The way this function needs to be written, -0.1 decreases red by 10% It sounds like you have something like ... def f1(color, redchange=0, bluechange=0, greenchange=0):    # some code here to make the changes    ret

Re: [Tutor] writing function changeColor

2012-07-18 Thread Steven D'Aprano
On Wed, Jul 18, 2012 at 05:37:17PM -0400, Aditi Pai wrote: > Hey, > > Do you know how to take your post off the discussion board? Do you mean taking a previous post off the discussion list? You can't. Once a post has been made, you can't delete it. It is public knowledge, archived on a dozen d

Re: [Tutor] writing function changeColor

2012-07-18 Thread Steven D'Aprano
Coming back to your original question... On Wed, Jul 18, 2012 at 01:10:51PM -0400, Aditi Pai wrote: > Hello, > > I am trying to write a function changeColor for an assignment. Two things > that I am unsure about for this assignment are how to assign different > colors to integers so that, red wi

Re: [Tutor] writing function changeColor

2012-07-18 Thread Steven D'Aprano
On Wed, Jul 18, 2012 at 05:31:00PM -0400, Aditi Pai wrote: > Ramit told me not to "top post," and I looked it up and I think I am doing > that same thing again, so if I am let me know how to avoid that. This kind > of discussion board is something I haven't interacted with before. In your email pr

Re: [Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Hey, Do you know how to take your post off the discussion board? Devin is right! I was looking for links or online resources but people keep trying to help me, which is awesome, but I'd like to do my own research. Thanks!! On Wed, Jul 18, 2012 at 5:31 PM, Aditi Pai wrote: > Ramit told me not to

Re: [Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Ramit told me not to "top post," and I looked it up and I think I am doing that same thing again, so if I am let me know how to avoid that. This kind of discussion board is something I haven't interacted with before. Steven, thank you for trying to help me. I thought my response to Bob was complet

Re: [Tutor] writing function changeColor

2012-07-18 Thread Devin Jeanpierre
On Wed, Jul 18, 2012 at 3:20 PM, Aditi Pai wrote: > I am trying my best to learn and your attitude was not welcome. If you don't > want to answer my question, I understand. I'm doing research elsewhere too > and because I am new at this, my familiarity with key terms and search words > is also imp

Re: [Tutor] writing function changeColor

2012-07-18 Thread Steven D'Aprano
Aditi Pai wrote: Emile, So far I have started with def changeColor(pict,scale,color): I was told to make different names for the float and integer (float = scale and color= integer) and then I kept everything else the same, just to test it out and see if that would work. So it looks like this

Re: [Tutor] writing function changeColor

2012-07-18 Thread Steven D'Aprano
Emile van Sebille wrote: On 7/18/2012 12:07 PM Aditi Pai said... Hey Emile! Thanks for the advice. I think maybe I should have combined the two parts of my email. The function is just called changeColor. I don't actually want to change the color as much as alter the color. I'm not sure there's

Re: [Tutor] writing function changeColor

2012-07-18 Thread Prasad, Ramit
Please do not top post. > I am trying my best to learn and your attitude was not welcome. If you don't > want to answer my question, I understand. I'm doing research elsewhere too and > because I am new at this, my familiarity with key terms and search words is > also improving, yet at a slower pa

Re: [Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Emile, So far I have started with def changeColor(pict,scale,color): I was told to make different names for the float and integer (float = scale and color= integer) and then I kept everything else the same, just to test it out and see if that would work. So it looks like this: def changeColor(

Re: [Tutor] writing function changeColor

2012-07-18 Thread Emile van Sebille
On 7/18/2012 12:07 PM Aditi Pai said... Hey Emile! Thanks for the advice. I think maybe I should have combined the two parts of my email. The function is just called changeColor. I don't actually want to change the color as much as alter the color. I'm not sure there's a difference... I'm wor

Re: [Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Dear Bob, I am trying my best to learn and your attitude was not welcome. If you don't want to answer my question, I understand. I'm doing research elsewhere too and because I am new at this, my familiarity with key terms and search words is also improving, yet at a slower pace. My goal is to find

Re: [Tutor] writing function changeColor

2012-07-18 Thread bob gailer
On 7/18/2012 1:10 PM, Aditi Pai wrote: Hello, I am trying to write a function changeColor for an assignment. Is this a class assignment or job-related? Point us to the assignment, Learn to ask meaningful questions. Otherwise you waste your time and ours. "assign different colors to integers s

Re: [Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Hey Emile! Thanks for the advice. I think maybe I should have combined the two parts of my email. The function is just called changeColor. I don't actually want to change the color as much as alter the color. I'm working off of this example: def decreaseRed(picture): for p in getPixels(picture): v

Re: [Tutor] writing function changeColor

2012-07-18 Thread Emile van Sebille
On 7/18/2012 10:10 AM Aditi Pai said... Hello, I am trying to write a function changeColor for an assignment. I'd look in the documentation of whatever it is you're trying to change the color of. It should be explained there how to set and change colors. You're going to end up with somethi

[Tutor] writing function changeColor

2012-07-18 Thread Aditi Pai
Hello, I am trying to write a function changeColor for an assignment. Two things that I am unsure about for this assignment are how to assign different colors to integers so that, red will be 1, blue will be 2, etc. Also, I learned python so that if I were to put in 0.9, it'd decrease red by 10%.