Fix typo and update condition in simulation function
This commit is contained in:
@@ -760,7 +760,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Let's measure the deltas for the simulation results (and the `estimated_sensity` results) compared to the actual `density` results:"
|
||||
"Let's measure the deltas for the simulation results (and the `estimated_density` results) compared to the actual `density` results:"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -925,7 +925,7 @@
|
||||
"def simulate_archery(previous_arrows=()) -> int:\n",
|
||||
" \"\"\"Simulate the archery tournament and return the number of arrows fired.\"\"\"\n",
|
||||
" arrow = random_arrow()\n",
|
||||
" if any(abs(arrow) > distance(a) for a in previous_arrows):\n",
|
||||
" if any(distance(arrow) > distance(a) for a in previous_arrows):\n",
|
||||
" return len(previous_arrows) + 1\n",
|
||||
" else:\n",
|
||||
" return simulate_archery([*previous_arrows, arrow])"
|
||||
|
||||
Reference in New Issue
Block a user