Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Turtles Hate Python

Name: Anonymous 2005-07-21 20:23

        .                                                      
                       _..------.._        +    ,'             
                    .-'    i       `-.        ,;               
              .   .'.      |.         `.    .'/                
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE   
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .                
             `.`^.,-Ce/    .'"'.   _.'  /                      
               `. '-h'_.._/0 " 0\/`    {\                      
       +         `.      |'-^Y^- |     //       .              
                  (`\     \_."._/\...-;..-.                    
                  `._'._,'` ```    _.:---''`                   
                     ;-....----'''`                            
                    /   (                   +                  
            sk/itz  |  (`                                      
                    `.^'                                       

Name: Anonymous 2005-07-22 6:29

win

Name: Anonymous 2005-07-22 6:53

Do you like Logo, Mr Turtle?

Name: Anonymous 2005-07-25 5:26

well, at least with fixed width we now have an ascii art board!

Name: Anonymous 2005-07-25 17:38

                   __________________________                           
           __..--/".'                        '.                         
   __..--""      | |                          |  YOU KNOW WHAT THE BEST 
  /              | |                          |  PART ABOUT BLOGS IS ???
 /               | |    ___________________   |                         
;                | |   :__________________/:  |  THE SECOND YOU SEE THE 
|                | |   |                 '.|  |  WORD USED ANYWHERE IN  
|                | |   |                  ||  |  JOURNALISM OR LITERATURE
|                | |   |                  ||  |  OF ANY KIND YOU KNOW   
|                | |   |                  ||  |  WITH CONFIDENCE THAT   
|                | |   |                  ||  |  YOU CAN THROW AWAY     
|                | |   |                  ||  |  WHATEVER WAS INVOLVED  
|                | |   |                  ||  |  KNOWING THAT IT'S      
|                | |   |                  ||  |  COMPLETELY SHIT        
|                | |   |______......-----"\|  |                         
|                | |   |_______......-----"   |  AS OF THIS DAY I'M     
|                | |                          |  STARTING AMERICANS     
|                | |                          |  AGAINST BLOGGERS       
|                | |                  ____----|                         
|                | |_____.....----|#######|---|                         
|                | |______.....----""""       |                         
|                | |                          |                         
|. ..            | |   ,                      |                         
|... ....        | |  (c ----- """           .'                         
|..... ......  |\|_|    ____......------"""|"                           
|. .... .......| |""""""                   |                            
'... ..... ....| |                         |                            
  "-._ .....  .| |                         |                            
      "-._.....| |             ___...---"""'                            
          "-._.| | ___...---"""                                         
              """""             grp                                     

Name: Anonymous 2005-07-30 9:19

This has to go to the frontpage

Name: Anonymous 2006-04-21 2:48 (sage)

<code>
lolz!
</code>

Name: Anonymous 2006-04-21 2:48 (sage)

lolz!

Name: Anonymous 2007-10-07 18:41


[code]
        .                                                     
                       _..------.._        +    ,'            
                    .-'    i       `-.        ,;              
              .   .'.      |.         `.    .'/               
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE  
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .               
             `.`^.,-Ce/    .'"'.   _.'  /                     
               `. '-h'_.._/0 " 0\/`    {\                     
       +         `.      |'-^Y^- |     //       .             
                  (`\     \_."._/\...-;..-.                   
                  `._'._,'` ```    _.:---''`                  
                     ;-....----'''`                           
                    /   (                   +                 
            sk/itz  |  (`                                     
                    `.^'                                       
[/code

Name: Anonymous 2009-03-06 7:18

The instruction into a   better lambda Example   of previous usage.

Name: Anonymous 2011-02-23 11:52

[a]        .                                                      
                       _..------.._        +    ,'             
                    .-'    i       `-.        ,;               
              .   .'.      |.         `.    .'/                
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE   
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .                
             `.`^.,-Ce/    .'"'.   _.'  /                      
               `. '-h'_.._/0 " 0\/`    {\                      
       +         `.      |'-^Y^- |     //       .              
                  (`\     \_."._/\...-;..-.                    
                  `._'._,'` ```    _.:---''`                   
                     ;-....----'''`                            
                    /   (                   +                  
            sk/itz  |  (`                                      
                    `.^'[/a]

Name: Anonymous 2011-02-25 11:31

anus
anus
anus

Name: Anonymous 2011-02-25 11:32

fuck off, 66faggot99

Name: Anonymous 2011-02-25 11:34

fuck off, 66faggot99

Name: Anonymous 2011-03-02 21:34

I AM THE MOST FUCKING NGGER MATURE

Name: Anonymous 2011-03-03 1:33

WHAT IS THE BEST WAY TO DO THIS:


"""
Solution to Exercise X.X on page X of Think Python
Allen B. Downey

"""

# here is a mostly-straightforward solution to the
# two-by-two version of the grid.

def do_twice(f):
    f()
    f()

def do_four(f):
    do_twice(f)
    do_twice(f)

def print_beam():
    print '+ - - - -',

def print_post():
    print '|        ',

def print_beams():
    do_twice(print_beam)
    print '+'

def print_posts():
    do_twice(print_post)
    print '|'

def print_row():
    print_beams()
    do_four(print_posts)

def print_grid():
    do_twice(print_row)
    print_beams()

print_grid()
   

# here is a less-straightforward solution to the
# four-by-four grid

def one_four_one(f, g, h):
    f()
    do_four(g)
    h()

def print_plus():
    print '+',

def print_dash():
    print '-',

def print_bar():
    print '|',

def print_space():
    print ' ',

def print_end():
    print

def nothing():
    "do nothing"

def print1beam():
    one_four_one(nothing, print_dash, print_plus)

def print1post():
    one_four_one(nothing, print_space, print_bar)

def print4beams():
    one_four_one(print_plus, print1beam, print_end)

def print4posts():
    one_four_one(print_bar, print1post, print_end)

def print_row():
    one_four_one(nothing, print4posts, print4beams)

def print_grid():
    one_four_one(print4beams, print_row, nothing)

print_grid()

comment = """
After writing a draft of the 4x4 grid, I noticed that many of the
functions had the same structure: they would do something, do
something else four times, and then do something else once.

So I wrote one_four_one, which takes three functions as arguments; it
calls the first one once, then uses do_four to call the second one
four times, then calls the third.

Then I rewrote print1beam, print1post, print4beams, print4posts,
print_row and print_grid using one_four_one.

Programming is an exploratory process.  Writing a draft of a program
often gives you insight into the problem, which might lead you to
rewrite the code to reflect the structure of the solution.

Name: Anonymous 2011-03-03 1:34

OR THIS:

print '+', 5*' - ', '+', 5*' - ', '+'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '+', 5*'   ', '|'
print '+', 5*' - ', '+', 5*' - ', '+'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '|', 5*'   ', '|', 5*'   ', '|'
print '+', 5*' - ', '+', 5*' - ', '+'

Name: Anonymous 2011-03-03 6:43

>>19-20

while True:
                                                     print "THE FORCED INDENTATION OF CODE"

Name: Anonymous 2012-07-30 8:41

Just check them

Name: Anonymous 2012-07-30 14:45

[a]        .                                                     
                       _..------.._        +    ,'            
                    .-'    i       `-.        ,;              
              .   .'.      |.         `.    .'/               
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE  
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .               
             `.`^.,-Ce/    .'"'.   _.'  /                     
               `. '-h'_.._/0 " 0\/`    {\                     
       +         `.      |'-^Y^- |     //       .             
                  (`\     \_."._/\...-;..-.                   
                  `._'._,'` ```    _.:---''`                  
                     ;-....----'''`                           
                    /   (                   +                 
            sk/itz  |  (`                                     
                    `.^'                                        [/a]
        .                                                     
                       _..------.._        +    ,'            
                    .-'    i       `-.        ,;              
              .   .'.      |.         `.    .'/               
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE  
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .               
             `.`^.,-Ce/    .'"'.   _.'  /                     
               `. '-h'_.._/0 " 0\/`    {\                     
       +         `.      |'-^Y^- |     //       .             
                  (`\     \_."._/\...-;..-.                   
                  `._'._,'` ```    _.:---''`                  
                     ;-....----'''`                           
                    /   (                   +                 
            sk/itz  |  (`                                     
                    `.^'                                       

Name: Anonymous 2012-07-30 14:45

        .                                                     
                       _..------.._        +    ,'            
                    .-'    i       `-.        ,;              
              .   .'.      |.         `.    .'/               
       `-_       ;.      , jl.____     `. .'.'    I'M A FREAKING
         `;-_   ;. ._..---"""     """--.:' /          TURTLE  
.          `.-..:,-"   ,_.-'`'--'`'-9"h` .'   .               
             `.`^.,-Ce/    .'"'.   _.'  /                     
               `. '-h'_.._/0 " 0\/`    {\                     
       +         `.      |'-^Y^- |     //       .             
                  (`\     \_."._/\...-;..-.                   
                  `._'._,'` ```    _.:---''`                  
                     ;-....----'''`                           
                    /   (                   +                 
            sk/itz  |  (`                                     
                    `.^'                                       

Don't change these.
Name: Email:
Entire Thread Thread List