[Tutor] writing function changeColor

Aditi Pai aditipai1227 at gmail.com
Wed Jul 18 23:37:17 CEST 2012


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 <aditipai1227 at gmail.com> 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.
>
> Steven, thank you for trying to help me. I thought my response to Bob was
> completely civil and you seem like a firey character, so I'll try to
> respond as evenly as I can to you too. Like I said before, I am on a
> learning curve, and the messages Emile and Ramit have sent me both had
> constructive criticism as to how to proceed with asking questions as well
> as awesome answers to my poorly-worded questions. The little side comments
> were not included. I don't mean to "waste your time" or Bob's apparently
> but asking that question led me to understand how to ask a better one. I am
> trying to improve and I've just started learning. Please don't be mean.
> Thank you.
>
>
> On Wed, Jul 18, 2012 at 4:42 PM, Steven D'Aprano <steve at pearwood.info>wrote:
>
>> 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:
>>>
>>> def changeColor(pict,scale,color):
>>>   for p in getPixels(pict):
>>>     value=getRed(p)
>>>     setRed(p,value*.9)
>>>
>>> Unfortunately I keep getting this error message:
>>>
>>> The error was:changeColor() takes at least 3 arguments (1 given)
>>>
>>
>>
>> Is this error message not clear? You have written a function that
>> requires at least 3 values, but you have only given 1 value.
>>
>> I can't tell you what argument you have given, because you have not told
>> us what you have done to get this error message.
>>
>> Aditi, we want to help you, but you're not giving us enough information
>> to go on. You're wasting our time, and your own.
>>
>> Instead of biting at poor Bob, who so far has given you the best and most
>> valuable advise, you should pay attention to what we are trying to teach
>> you. Would you rather that we just ignored you in silence?
>>
>> I'm about to move away from the computer for an hour or so. When I come
>> back, I will try to give you some more assistance. Or somebody else may try
>> to help. In the meantime, I suggest you try reading this page and see if it
>> enlightens you:
>>
>> http://sscce.org/
>>
>>
>>
>> --
>> Steven
>>
>> ______________________________**_________________
>> Tutor maillist  -  Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120718/a5eabab2/attachment.html>


More information about the Tutor mailing list