Calling function throwing up errors


#1

I’ve coded this program and defined it along with a function. However when I call the function it is throwing up errors as seen below saying that integer is not defined. The code without the defining works fine, I just want to get it to work with this function definition. Do I need to take the word integer out when defining the function? I’m pulling my hair out

many thanks


#2

List should be defined outside the function, and then supplied as argument. By supplying different lists as argument on function call, you can make the function work for different lists.

i should put the import at the beginning of the file, no need to import every-time the function runs


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.