0

i am not able to figure out why python throws an error when i call this function.
In the code snippet below when i call set_greyLevel() python throws an error.
If i comment the function call it works fine.

Please help. Thanks in advance.

def set_greyLevel(self, grayScale):
        if grayScale == 0:
            return "#cecece"
        elif grayScale == 1:
            return "#a0a0a0"
        elif grayScale == 2:
            return "#787878"
        elif grayScale == 3:
            return "#505050"
        else:
            return  "#000"

   def test(self, grayScale):
        temp = set_greyLevel(grayScale)
        print temp
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by willygstyle
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.