Naar hoofdinhoud
🔒 Voorbeeldmodus. De eerste vijftien Foundations-lessen zijn gratis; deze is Pro. Start een 7-daagse trial om de editor, AI-hints en de rest van het curriculum te ontgrendelen. Kaart vereist, op elk moment opzegbaar in Dashboard.Start 7-daagse trial →
← CursussenPython FoundationsModule 9 · Bonus: mini-projectenMINI: Tic-Tac-Toe — detect a winnermission170 / 174
+200 XP
Opdracht🌐 shown in RU
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
✏️ Schrijf hier je code
🐍
Python laden...
Eenmalige download (~1 MB). Daarna direct beschikbaar.
📊 Resultaat
Klik op Uitvoeren om het resultaat te zien...

💬 Discussie

Wees de eerste — stel een vraag of deel een tip.
Log in om mee te doen aan de discussie. Lezen is gratis.
Discussie laden…