[Verba] Nemesis Coding

Stuart D. Gathman stuart at gathman.org
Sat Jan 21 12:46:09 EST 2006


Hello Pythonistas,  I ran across this little puzzle for you to practice 
with.  On the Slashdot blog, http://science.slashdot.org , there was an article
about the Nemesis theory:

http://www.binaryresearchinstitute.org

"The Binary Companion or 'Nemesis' theory asserts that a yet-to-be discovered
companion to our Sun may actually exist. Recent observations of two nearby
stars (assumed companions) show debris disks 'strikingly like the Kuiper Belt
int the outer part of our Solar System'. The Binary Research Institute site is
devoted to the theory, and presents a concise introduction, list of evidence,
and sample calculations in support of the theory. A fascinating read, although
the physics and related calculations are not trivial."

One of the comments was the following:

010000100110100101101110011000010111001001111001

01010011011010000110111101101111011101000010000100
100000010101110110010100100000
01101100011010010111011001100101001000000110100101
101110001000000110000100100000
01100010011010010110111001100001011100100111100100
100000011100110111100101110011
01110100011001010110110100111111

Refer to my previous email on Coding, except there was a misspelling.
To convert codes to chars, the builtin python functions are:

chr(  	i)
    Return a string of one character whose ASCII code is the integer i. For
    example, chr(97) returns the string 'a'. This is the inverse of ord(). The
    argument must be in the range [0..255], inclusive; ValueError will be
    raised if i is outside that range.

int(  	[x[, radix]])
    Convert a string or number to a plain integer. If the argument is a string,
    it must contain a possibly signed decimal number representable as a Python
    integer, possibly embedded in whitespace. The radix parameter gives the
    base for the conversion and may be any integer in the range [2, 36], or
    zero. If radix is zero, the proper radix is guessed based on the contents
    of string; the interpretation is the same as for integer literals. If radix
    is specified and x is not a string, TypeError is raised. Otherwise, the
    argument may be a plain or long integer or a floating point number.
    Conversion of floating point numbers to integers truncates (towards zero).
    If the argument is outside the integer range a long object will be returned
    instead. If no arguments are given, returns 0.

You have learned about subscripting strings.  Write a python program to 
decode the message.  Do not depend on whitespace (spaces) in the input.

Here was a reply:

Re: 010000100110100101101110011000010111001001111001

01000001 01100011 01110100 01110101 01100001 01101100 01101100 01111001
00101100 00100000 01001001 00100111 01101101 00100000 01110010 01100001
01110100 01101000 01100101 01110010 00100000 01100001 01101101 01100001
01111010 01100101 01100100 00101110 00100000 00100000 01001001 00100000
01101000 01100001 01100100 00100000 01100001 00100000 01110010 01100001
01110100 01101000 01100101 01110010 00100000 01101100 01101111 01110111
00100000 01101111 01110000 01101001 01101110 01101001 01101111 01101110
00100000 01101111 01100110 00100000 01110100 01101000 01100101 00100000
01010011 01101100 01100001 01110011 01101000 01100100 01101111 01110100
00100000 01110010 01100101 01100001 01100100 01100101 01110010 01110011
01101000 01101001 01110000 00100000 01110101 01101110 01110100 01101001
01101100 00100000 01001001 00100000 01110011 01100001 01110111 00100000
01110100 01101000 01100001 01110100 00100000 01111001 01101111 01110101
01110010 00100000 01100011 01101111 01101101 01101101 01100101 01101110
01110100 00100000 01100111 01101111 01110100 00100000 01101101 01101111
01100100 01100100 01100101 01100100 00100000 01110101 01110000 00100001
00100000 00100000 01001110 01101111 01110111 00101100 00100000 01001101
01111001 00100000 01110110 01101001 01100101 01110111 00100000 01101000
01100001 01110011 00100000 01100011 01101000 01100001 01101110 01100111
01100101 01100100 00101110 00101110 00101110 00100000 01110100 01101000
01100101 01110010 01100101 00100000 01110011 01100101 01100101 01101101
01110011 00100000 01110100 01101111 00100000 01100010 01100101 00100000
01101001 01101110 01110100 01100101 01101100 01101100 01101001 01100111
01100101 01101110 01110100 00100000 01101100 01101001 01100110 01100101
00100000 01101111 01101110 00100000 01010011 01101100 01100001 01110011
01101000 01100100 01101111 01110100 00100001 00001010 00001010 01010100
01101000 01101001 01110011 00100000 01101001 01110011 00100000 01101100
01101001 01101011 01100101 00100000 01010011 01000101 01010100 01001001
01000000 01001000 01101111 01101101 01100101 00100001

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Verba mailing list