How to read input as float in Python

1 Answer

0 votes
f = float(input("Enter a number: "))

print(f)


'''
run:

Enter a number: 3.14
3.14

'''

 



answered Sep 25, 2019 by avibootz

Related questions

1 answer 157 views
2 answers 190 views
1 answer 195 views
195 views asked Sep 11, 2018 by avibootz
1 answer 256 views
1 answer 238 views
...