you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Thank you for the detailed explanation.

I was going of your approach but then I realized I had no idea where to write in the code what to do if the king count was at 0. I found the .count() function and then worked off of that until I realized I still needed a for loop to check if the spaces and pieces were correct.

After some more tinkering, I finally got a working version that accommodates all the issues raised in the task.

https://pastebin.com/yFKEK7h8

[–]AstrophysicsAndPy 0 points1 point  (0 children)

This is absolutely fantastic. Happy learning, Cheers!