Skip to content

Commit

Permalink
Update Milestone Project 1 - Advanced Solution.ipynb
Browse files Browse the repository at this point in the history
ask_player function should also check if the entered int is within allowed 1..9 range
  • Loading branch information
prezha authored Jul 3, 2016
1 parent d4caaf1 commit 4c3f1c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Milestone Project 1 - Advanced Solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@
" print(\"Sorry, please input a number between 1-9.\")\n",
" continue\n",
"\n",
" if choice not in range(1,10):\n",
" print(\"Sorry, please input a number between 1-9.\")\n",
" continue\n",
"\n",
" if board[choice] == \" \":\n",
" board[choice] = mark\n",
" break\n",
Expand Down

0 comments on commit 4c3f1c7

Please sign in to comment.