Skip to content Skip to sidebar Skip to footer

Assistance With Issue

While writing some code for a class, it gave this error and I don't know how to fix it as I personally do not see any issues with what it is addressing traceback (most recent call

Solution 1:

It looks like you're comparing a String and an Integer

do this:

if int(studNum) > STUD_NUMBER:

This is called casting. You will be converting a string to an int by using this function: int()

How to compare string and integer in python?


Post a Comment for "Assistance With Issue"