Ad
  • Custom User Avatar

    That's because of this other line in your code:

    print(sheep_count(array1))
    

    Remove it or call the function with the right name: count_sheeps.

    Traceback (most recent call last):
      File "tests.py", line 1, in <module>
        from solution import *
      File "/workspace/default/solution.py", line 11, in <module>
        print(sheep_count(array1))
    NameError: name 'sheep_count' is not defined
    

    It says line 11 and it shows the line's content in the error message.