Hi All,
The following site maybe of interest:
http://en.wikibooks.org/wiki/Wikibooks:Computing_department
Hugh
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Asrarahmed Kadri wrote:
> Can anyone help me with teh problem of "converting a decimal number
> into its binary equivalent"??
>
Ah, sorry, I didn't read the subject line, just the e-mail.
You said a decimal integer into binary. I thought you meant any random
decimal value.
My bad :)
You should
Asrarahmed Kadri wrote:
> Can anyone help me with teh problem of "converting a decimal number
> into its binary equivalent"??
>
How is your decimal number stored?
> Thanks in anticipation.
>
> Regards,
> Asrar Kadri
>
>
Can anyone help me with teh problem of "converting a decimal number into its binary equivalent"??
Thanks in anticipation.
Regards,
Asrar Kadri
--
Winners are willing to do things that losers wont do.
___
Bryan Leber wrote:
>
> Hello, I am trying to create a script that reads from the command line
> and puts the sysargv into a list. I have this part done. I have added
> code for testing and one of those testing procedures is to print the
> list out in a text file. Not all field are required and may
thats fine its just my dad would need that and it would be easier for him if he had the exchange rate bulit inOn 9/17/06, Dick Moores <
[EMAIL PROTECTED]> wrote:At 07:10 PM 9/17/2006, Amadeo Bellotti wrote:>ok i jsut wanted to say great program but i would like to see an
>acutal exchange rate like
>>> And what's the downside of the way I've done it?
>>
>> Its slow...
>
> Actually it is not particularly slow. The actual function code is
> created once, when the module is compiled; creating a function
> object and binding it to a name is pretty fast. There is a good
> discussion here:
> htt
At 06:56 AM 9/18/2006, Luke Paireepinart wrote:
>Dick Moores wrote:
>>At 05:20 AM 9/18/2006, Kent Johnson wrote:
>>
>>
>>>You have greatly underused Decimal - it is capable of multiplication and
>>>division of fractional quantities directly:
>>>
>>>In [1]: from decimal import Decimal as D
>>>
>>>In
Dick Moores wrote:
> At 05:20 AM 9/18/2006, Kent Johnson wrote:
>
>
>> You have greatly underused Decimal - it is capable of multiplication and
>> division of fractional quantities directly:
>>
>> In [1]: from decimal import Decimal as D
>>
>> In [2]: x=D('1.23')
>>
>> In [3]: y=D('4.5')
>>
>> I
Dick Moores wrote:
> At 01:00 AM 9/18/2006, Alan Gauld wrote:
>
1. in your roundNumber function, you define a function
incrementDigit.
I'm pretty sure that this function is destroyed and recreated
every time
you call the function roundNumber.
>>> I don't
At 05:20 AM 9/18/2006, Kent Johnson wrote:
>You have greatly underused Decimal - it is capable of multiplication and
>division of fractional quantities directly:
>
>In [1]: from decimal import Decimal as D
>
>In [2]: x=D('1.23')
>
>In [3]: y=D('4.5')
>
>In [4]: x*y
>Out[4]: Decimal("5.535")
>
>In
At 01:00 AM 9/18/2006, Alan Gauld wrote:
> >> 1. in your roundNumber function, you define a function
> >> incrementDigit.
> >> I'm pretty sure that this function is destroyed and recreated
> >> every time
> >> you call the function roundNumber.
> > I don't understand. What's another way?
>
>def
Alan Gauld wrote:
>>> 1. in your roundNumber function, you define a function
>>> incrementDigit.
>>> I'm pretty sure that this function is destroyed and recreated
>>> every time
>>> you call the function roundNumber.
>> I don't understand. What's another way?
>
> def f():
> def g(): retur
Dick Moores wrote:
> I'm bck!
>
> I kept getting ideas for what I (and some of you) thought was a
> finished yen-USD.py. And some of the good advice I got was to move on
> to other things. I did for a while, but I kept thinking up new
> revisions. The script has more than doubled in length.
I do the following:
file = StringIO.StringIO(buffer)
img = Image.open(file)
img.save(file, 'JPEG')
I get this error:
img = Image.open(file)
File "/home/rahhal/python/lib/python2.4/site-packages/PIL/Image.py", line 1745, in open
raise IOError("cannot identify image file")
IOError:
I do the following:
file = StringIO.StringIO(buffer)
img = Image.open(file)
img.save(file, 'JPEG')
I get this error:
img = Image.open(file)
File "/home/rahhal/python/lib/python2.4/site-packages/PIL/Image.py", line 1745, in open
raise IOError("cannot identify image file")
IOError: cannot id
> Hi Linda,
>
> what do you get when you try:
>
> >>> import os
> >>> os.getcwd()
>
> The current working directory is represented in sys.path as the first
> element:
>
> >>> import sys
> >>> sys.path[0]
> ''
>
>
> Not the most intuitive, perhaps.
>
> I suspect you are launching your Python env
>> 1. in your roundNumber function, you define a function
>> incrementDigit.
>> I'm pretty sure that this function is destroyed and recreated
>> every time
>> you call the function roundNumber.
> I don't understand. What's another way?
def f():
def g(): return 42
return g()
def g():
> *sigh* Perhaps when I start grad school I'll be in a position to use
> my
> favored language...until then I guess .NET wins.
Have you tried IronPython?
Python for .NET...
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
- Original Message -
From: "federico ramirez" <[EMAIL PROTECTED]>
To: "Alan Gauld" <[EMAIL PROTECTED]>
Sent: Monday, September 18, 2006 12:43 AM
Subject: Re: [Tutor] i just cant do it
> Nope...sorry i tried what they said in that article but it didnt
> work :(
>>_<
>
> 2006/9/17, Alan
At 08:13 PM 9/17/2006, Luke Paireepinart wrote:
Dick Moores wrote:
> I'm bck!
>
> I kept getting ideas for what I (and some of you) thought was a
> finished yen-USD.py. And some of the good advice I got was to move
on
> to other things. I did for a while, but I kept thinking up new
> revis
21 matches
Mail list logo