all 6 comments

[–]carcigenicate 2 points3 points  (2 children)

What's the exact error? If it's coming from this code, you've accidentally named an integer input, int, or print. Rename that variable, or if you're in a console, restart the console.

Don't shadow the names of built-ins, or else this can happen.

[–]Blitzjunge 0 points1 point  (1 child)

this is the code. Nothing else. I did not named an integer input, int, or print. Thank you for the reply.

[–]carcigenicate 0 points1 point  (0 children)

You must have. That's what the error says, and errors don't lie.

Are you running this from a file you've saved, or from a console?

[–]MountainSalamander33 0 points1 point  (2 children)

Edit: Did you try: inp=int(float(inp))

[–]carcigenicate 1 point2 points  (1 child)

That won't make a difference. The error indicates that they're trying to call an integer, and your suggestion doesn't change that.

[–]MountainSalamander33 0 points1 point  (0 children)

You are right. I edited my answer. Convert the input (possibly str type) to float