numInput
is a function, but you aren't calling it when you pass it to posNumAvg
when defining myDict
here:
posNumAvg(numInput)
That function is passed to posNumAvg
as local variable numList
, then is num
, then is compared against 0
, always referencing the function. Functions and numbers can't be compared, and that's the error you're seeing.
You probably just need to call the function, like this:
posNumAvg(numInput())