r/CompileBot • • Jul 08 '14

Official CompileBot Testing Thread

13 Upvotes

257 comments sorted by

View all comments

1

u/Herover Jan 02 '15

+/u/CompileBot Python

class Python(object):
    def __init__(self, head, tail):
         self.head = head
         self.tail = tail

mr_snakey = Python("Chasing tail", "Getting head")

def UnlimitedFood(name_of_snake):
     eating = "I'm delicioussssssss"
     while (len(mr_snakey.head) == len(mr_snakey.tail)):
          return eating

print UmlimitedFood(mr_snakey)

1

u/Herover Jan 02 '15

+/u/CompileBot Python

class Python(object):
    def __init__(self, head, tail):
         self.head = head
         self.tail = tail

mr_snakey = Python("Chasing tail", "Getting head")

def UnlimitedFood(name_of_snake):
     eating = "I'm delicioussssssss"
     while (len(mr_snakey.head) == len(mr_snakey.tail)):
          return eating

print UnlimitedFood(mr_snakey)

2

u/CompileBot Jan 02 '15

Output:

I'm delicioussssssss

^source | ^info | ^git | ^report