Answers for "print int with float in python"

0

printing float number python

x = 1.1234567898
print("%.10f" % x)
Posted by: Guest on April-13-2020
1

python int string float

string = "3.5"
#integer = int(string) will not work, as that returns an error.
integer = int(float(string)) #This will work, as you first turn "3.5" to 3.5
                                     #then make it the integer 3
Posted by: Guest on November-11-2021

Code answers related to "print int with float in python"

Python Answers by Framework

Browse Popular Code Answers by Language