Why is my function stating Name error not defined when it is very obviously defined and also working independently but not as nested in another code
I am writing a code that can visualize different types of sorting algorithms. I have integrated 5 different algorithms all of which work just fine but for some reason the introsort code just doesnt work and gives me a name error array not defined. even though I have defined the array and the individual code works if I run it on another instance of python. It just doesnt run when I try to trigger it with the command function from tkinter’s buttons.