I've looked at many similar issues but cannot find an answer so I'm hoping you guys can help me. I keep getting that TypeError message but have no idea why. Any advice would be greatly appreciated.
number = raw_input("Enter a number to be rounded: ")
decimallocation = number.find('.')
right = number[decimallocation:]
greater = int(number+right+1)
lesser = int(number+right)
if right >= .5:
print (greater)
else:
print (lesser)
rightis a string, so it can't be compared with a float. Perhaps doif float(right) >= .5:.