Why I am facing this error ‘>’ not supported between instances of ‘_Printer’ and ‘int’?

Here’s the my code. Please check this. I dont understand why I am getting this error?

def graduation_reqs(creadits):
if credits > 120 :
return “You have enough credits to graduate!”

Difficult to say without seeing the rest of the code

one possible explanation is that your parameter is named creadits, while in the function you use credits.

2 Likes

thanx i misstyped the variable