I have some code shown below which behaves for the most part as I expect it to except on odd occasions. Can anyone point out where I have gone wrong?
import n