As the title might specify, I want to ask how can I test a variable if it is an integer. I have seen other topics and they don't seem to have code that works or that I know how to use.
print("Enter the weight of the bag in grams.")
weight = float(input()) # float was used as it might be a decimal sometimes
amtcoin = weight / 3.56
amtcoin variable is instance of class you declare it. Declare it as float and if you want to know if it's a fraction or not check
amtcoin % 1 == 0