Answers for "random from a float to int python"

6

random float python

>>> random.uniform(1.5, 1.9)
1.8733202628557872
Posted by: Guest on December-17-2020
13

convert float to int python

# convert float to int 
x=3.1415
y=int(x)
print(y) #outputs 3
Posted by: Guest on December-08-2020
2

float to int in python

# convert float to int 

int(2.0) #output :2
Posted by: Guest on May-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language