Funky Chess Board

What’s wrong in my code? It’s giving correct output on local system.