Error while executing the code

‘>’ not supported between instances of ‘int’ and ‘NoneType’

I performed the same execution of the above code and i can’t find any problem with the code but this error is raised

Hey @adirayer, it seems your one of fval and val doesn’t contain integer value. Try printing both using print statement just above the comparison line, to debug which one is missing. After you get which one is none, try to see if you set/passed the value for that. In case doubt persists, do share the link of your ipynb notebook after saving it on google drive.

Hope this resolved your doubt.