Core Python Programming . . .
Mike Driscoll
kyosohma at gmail.com
Fri Jan 18 17:17:33 EST 2008
On Jan 18, 1:55 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> FireNWater <kho... at gmail.com> writes:
> > 1) convert a 4-digit Integer (WXYZ) to an IP address (WWW.XXX.YYY.ZZZ)
>
> > or
>
> > 2) convert an 8-digit Integer (WWWXXXYYYZZZ) to (WWW.XXX.YYY.ZZZ)
>
> > Thanks for anyone with the clue!!!
>
> Without being able to see the exercise I suspect it's turn a 4-byte
> string (i.e. 32 bits) into an IP address (int8.int8.int8.int8).
> Or, it might be turn a 32-bit int into such an address.
I've got the book and I think the OP may be referring to this:
6-11 Conversion.
(a) Create a program that will convert from an integer to an
Internet Protocol (IP) address in the four-octet format of WWW.XXX.YYY.ZZZ
(b) Update your program to be able to do the vice verse of the
above.
It could be a 12 digit int...or it could be what you (Paul) are
referring to.
Mike
More information about the Python-list
mailing list