Demo entry 6687376



Submitted by anonymous on Dec 28, 2017 at 10:01
Language: Python. Code size: 880 Bytes.

Toggle line numbers
           class Rectangle(Blob):
                    def __init__(self, width, height,
                                            color='black', emphasis=None, highlight=0):
                            if width == 0 and height == 0 and \
                           color == 'red' and emphasis == 'strong' or \
                           highlight > 100:
                                    raise ValueError, "sorry, you lose"
                            if width == 0 and height == 0 and (color == 'red' or
                                                                                               emphasis is None):
                                    raise ValueError, "I don't think so"
                           Blob__init__(self, width, height,
                                                     color, emphasis, highlight)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).