int try convert to int code example Example: how to convert an string to an int using try try: fx = float(x) fy = float(y) except: print ("Invalid input")