C4W4 assignment2 exercise6

The notebook code is stateful. If you want consistent results, you can’t just rerun a few of the cells. You have to restart from a clean slate. Try this sequence:

1) Kernel -> Restart and Clear Output
2) Cell -> Run All
3) Go to 1

You should see consistent results.