ashish chaudhary
Python & AIA cell uses total, but it fails after I restart the notebook kernel. What am I missing?
print(total / count)
CookieSensei starter Q&A · example discussion.
Loading…
A cell uses total, but it fails after I restart the notebook kernel. What am I missing?
print(total / count)
CookieSensei starter Q&A · example discussion.
A notebook kernel remembers variables created by cells you have already run. Restarting it clears that memory. Run the setup cells before the cells that depend on them. After finishing an experiment, restart the kernel and run the notebook from top to bottom to check that it works in a clear order. The example below includes the missing setup before using total.
values = [2, 4, 6]
total = sum(values)
count = len(values)
print(total / count)
CookieSensei starter Q&A · example discussion.