JAPH

Discussion in 'Python' started by Lawrence D'Oliveiro, Nov 12, 2005.

  1. import sys
    charset = " .JPacehknorstuy"
    modulo = 17
    s = 69859911049503515105680510599913390885187193231927247909305172858127641629
    num = iter(range(2, 9999))
    while s != 1 :
    n = num.next()
    if s % n == 0 :
    sys.stdout.write("%s" % charset[(n - 1) % modulo])
    s /= n
    #end if
    #end while
    sys.stdout.write("\n")
     
    Lawrence D'Oliveiro, Nov 12, 2005
    #1
    1. Advertising

  2. charset, modulo, japh = " .JPacehknorstuy", 17, ""
    s =
    69859911049503515105680510599913390885187193231927247909305172858127641629
    for n in xrange(2,9999):
    if s%n==0:
    japh += charset[(n - 1) % modulo]
    s /= n
    if s==1:
    break
    print japh
     
    Szabolcs Nagy, Nov 12, 2005
    #2
    1. Advertising

  3. Lawrence D'Oliveiro

    Michael Guest

    Szabolcs Nagy wrote:

    > charset, modulo, japh = " .JPacehknorstuy", 17, ""
    > s =
    > 69859911049503515105680510599913390885187193231927247909305172858127641629
    > for n in xrange(2,9999):
    > if s%n==0:
    > japh += charset[(n - 1) % modulo]
    > s /= n
    > if s==1:
    > break
    > print japh


    More pythonic:

    print "Just another Python hacker."

    :)


    Michael.
     
    Michael, Nov 13, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan Castillo

    my first japh

    Bryan Castillo, Jul 7, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    128
    Bryan Castillo
    Jul 8, 2003
  2. Pedro Graca

    newbie 4th JaPH

    Pedro Graca, Nov 7, 2003, in forum: Perl Misc
    Replies:
    8
    Views:
    96
    Pedro Graca
    Nov 11, 2003
  3. Thomas Kratz

    comments on JAPH?

    Thomas Kratz, Nov 17, 2003, in forum: Perl Misc
    Replies:
    12
    Views:
    181
    Thomas Kratz
    Nov 24, 2003
  4. please # japh

    , Jan 13, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    100
  5. robin

    matrix japh

    robin, May 24, 2005, in forum: Perl Misc
    Replies:
    0
    Views:
    88
    robin
    May 24, 2005
Loading...

Share This Page