Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesPython FoundationsModule 9 · Bonus: mini-projectsMINI: Tic-Tac-Toe — detect a winnermission170 / 174
+200 XP
Task
Implement `check(board)` for a 9-cell board (list of strings, "" for empty). Run it on these five boards — three canonical wins/draw plus two boundary cases — and print the result for each: ["X","X","X","","O","","O","",""] # X wins top row (canonical) ["X","O","X","O","X","O","O","X","O"] # draw — board full, no line ["X","O","","X","O","","X","",""] # X wins left column ["","","","","","","","",""] # boundary: empty board → None ["O","X","X","X","O","","X","","O"] # boundary: O wins diagonal 0-4-8 Expected: X draw X None O
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
📊 Result
Press Run to see result...

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…