So I want to print a float number as an integer. I have a float called "percentage" which should be like percentage=36.1 and I want to print it as an int number, with digits after comma missing.
I use the following code, which is more like using C logic:
percentage=36.1
print "The moisture percentage is at %d %.", percentage
But that gives an error. How would I have to reform it so that it works in Python? What I want to print is: "The moisture percentage is 36%."
int(percentage)