def twice(parameter = 2)
return 4
2009/9/20 daggerdvm dagger...@yahoo.com:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
--
http://mail.python.org/mailman/listinfo/python-list
In article fa454992-d61a-4fb7-b684-c8535bce5...@e18g2000vbe.googlegroups.com,
daggerdvm dagger...@yahoo.com wrote:
you brain needs error checking!
Whose brain? At least I know this:
Your brain is beyond repair. Go for a brain transplant.
Groetjes Albert
--
--
Albert van der Horst,
I come from a scientific background, so my approach to the solution of
this problem is a little different.
It makes use of some numerical approximations, but that's not
necessarily a bad thing, because it helps avoid singularities. So it
could be a little more robust than other solutions
On Sep 23, 7:36 pm, David C Ullrich dullr...@sprynet.com wrote:
On Tue, 22 Sep 2009 02:34:53 +, Steven D'Aprano wrote:
On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
But you actually want to return twice the value. I don't see how to do
that.
What?
Seriously?
You're
On Sep 24, 5:51 am, Iain King iaink...@gmail.com wrote:
On Sep 23, 7:36 pm, David C Ullrich dullr...@sprynet.com wrote:
On Tue, 22 Sep 2009 02:34:53 +, Steven D'Aprano wrote:
On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
But you actually want to return twice the
On 9月22日, 上午4时49分, daggerdvm dagger...@yahoo.com wrote:
you brain needs error checking!
this kid knows error checking...may be he know exceptions as well
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 21 Sep 2009 21:49:50 +0100, daggerdvm dagger...@yahoo.com wrote:
you brain needs error checking!
Your post, by contrast, needs grammar checking.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 22 Sep 2009 07:41:11 -0700, Hyuga wrote:
Forget ethical. We can do his homework for him, we can perhaps pass
exams for him, maybe graduate for him, and then with our luck, he'll
get a job in our office and we get to do his work for him.
No, no, no. The plan is to do his homework
On Sep 22, 9:57 am, Grant Edwards inva...@invalid.invalid wrote:
No, no, no. The plan is to do his homework for him so that
he's incompetent when he graduates and won't be competition for
the rest of us who did do our homework.
Don't forget the Peter principal --- we might end up working for
On Sep 23, 2009, at 8:15 , Casey Webster wrote:
Btw, I can't believe nobody provided the simplest literal solution:
def twice(i):
return i, i
--
or this one, which is possibly even more literal:
def twice(p):
return an int that is twice the value of the parameter
twice(an int
On Tue, 22 Sep 2009 02:34:53 +, Steven D'Aprano wrote:
On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
But you actually want to return twice the value. I don't see how to do
that.
What?
Seriously?
You're saying it _can_ be done in Python? They must have added
something
On Sep 20, 10:27 pm, daggerdvm dagger...@yahoo.com wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
I will stop this theatre...
as you should know, you want your function to
On Monday, 21 September 2009 22:50:31 daggerdvm wrote:
carl banks.you are a dork
No mister_do_my_homework, he is not.
He is actually a respected member
of this little community.
You, however, are beginning to look like one.
Why do you not come clean - tell us what you are doing,
daggerdvm wrote:
what are you retarded? this is not a test you moron, i can ask all
the questions i want about it.
You seem to have forgotten to CC the list. Let me help show the
world your mad skillz -- at replying, at programming, at
orthography, at interpersonal communication...
Sure
you brain needs error checking!
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 21 Sep 2009 13:46:31 -0700 (PDT) daggerdvm
dagger...@yahoo.com wrote:
u don't want to answerthen why post?...get lost.
You're not doing yourself a favor with this attitude, much less
displaying it. You asked a question that you could have solved with 1
hour's worth of
On Monday 21 September 2009 22:49:50 daggerdvm wrote:
you brain needs error checking!
try:
return response()
except Troll,e:
raise dontFeed(anymore=True)
\d
--
home: http://otherwise.relics.co.za/
2D vector animation : https://savannah.nongnu.org/projects/things/
Font manager :
On Sep 21, 1:27 am, daggerdvm dagger...@yahoo.com wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
Please note that most mails here are humorous - as should be expected
for a
Tim Roberts wrote:
daggerdvm dagger...@yahoo.com wrote:
carl banks.you are a dork
What are you, eleven years old?
Look, you asked us to answer for you what is CLEARLY a homework question.
It is unethical for you to ask that, and it is unethical for us to answer
it.
Forget
Mel mwil...@the-wire.com writes:
Tim Roberts wrote:
Look, you asked us to answer for you what is CLEARLY a homework
question. It is unethical for you to ask that, and it is unethical
for us to answer it.
Forget ethical. We can do his homework for him, we can perhaps pass
exams for him,
http://codingforums.com/showthread.php?s=e26b8b0aabc69745ef24a855b1a0fc83t=177529
It seems that this dude really is looking for how to double a variable...
hi looking for help catching up in a class and overall to get me better than
i am now. I can pay you by the week or per hour.
everything
On 2009-09-22, Mel mwil...@the-wire.com wrote:
Tim Roberts wrote:
daggerdvm dagger...@yahoo.com wrote:
carl banks.you are a dork
What are you, eleven years old?
Look, you asked us to answer for you what is CLEARLY a homework question.
It is unethical for you to ask that, and it
On Sep 22, 9:57 am, Grant Edwards inva...@invalid.invalid wrote:
On 2009-09-22, Mel mwil...@the-wire.com wrote:
Tim Roberts wrote:
daggerdvm dagger...@yahoo.com wrote:
carl banks.you are a dork
What are you, eleven years old?
Look, you asked us to answer for you what is
On Tue, Sep 22, 2009 at 11:58 PM, Mahmoud Abdelkader
mabdelka...@gmail.comwrote:
hi looking for help catching up in a class and overall to get me better
than i am now. I can pay you by the week or per hour.
Wow. I'd feel guilty getting paid doing that. Sounds all too easy.
I hope he is
On Sep 20, 1:27 pm, daggerdvm dagger...@yahoo.com wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
Simple:
Once you define the function, copy it using your editor commands,
Steven D'Aprano wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the parameter.
how can i do this
Yes, that certainly is an easy question.
Here's my solution:
class MultiplierFactory(object):
[snip a marvel of
u don't want to answerthen why post?...get lost.
--
http://mail.python.org/mailman/listinfo/python-list
carl banks.you are a dork
--
http://mail.python.org/mailman/listinfo/python-list
daggerdvm wrote:
u don't want to answerthen why post?...get lost.
On the contrary! We *do* want to answer. Prizes are awarded based on
the most outlandish yet correct answer, on the most literal answer, and
on the funniest answer!
Ridiculous questions like yours are what
On Sep 21, 1:46 pm, daggerdvm dagger...@yahoo.com wrote:
u don't want to answerthen why post?...get lost.
I eat children...
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
But you actually want to return twice the value. I don't see how to do
that.
What?
Seriously? You're not just yanking the OP's chain???
--
Steven
who normally does quite well detecting sarcasm in writing
--
But you actually want to return twice the value. I don't see
how to do that.
Ah, I think I see...returning more than once is done with the
yield keyword:
def f(param):
yield param
yield param
That returns twice the integer parameter... :-D
However, the OP was instructed to Write
On 2009-09-21, David C Ullrich dullr...@sprynet.com wrote:
On Sun, 20 Sep 2009 13:27:07 -0700, daggerdvm wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the parameter.
how can i do this
I don't think this
daggerdvm dagger...@yahoo.com wrote:
carl banks.you are a dork
What are you, eleven years old?
Look, you asked us to answer for you what is CLEARLY a homework question.
It is unethical for you to ask that, and it is unethical for us to answer
it.
As others have said, show us what you
daggerdvm wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
That's a very basic question. Try a tutorial.
--
http://mail.python.org/mailman/listinfo/python-list
daggerdvm wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
Read over your textbook and the notes you took in class -- I'm
sure therein you'll find how to define functions, how
On Sun, 20 Sep 2009 13:27:07 -0700, daggerdvm wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the parameter.
how can i do this
Yes, that certainly is an easy question.
Here's my solution:
class
On Mon, Sep 21, 2009 at 6:27 AM, daggerdvm dagger...@yahoo.com wrote:
Write the definition of a function twice , that receives an int
parameter and returns an int that is twice the value of the
parameter.
how can i do this
I thought it was easier to implement this twice function than
38 matches
Mail list logo