Confused | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Confused

Why we represent float before asking for input by user. I mean user_input = float(input("Enter a number")) Here why we use float before input in right hand side

30th May 2019, 3:49 PM
Samir
Samir - avatar
1 Answer
+ 2
I don't quite understand your question. I'm guessing you mean why do we use them. We use them to represent very precise numbers such as decimals.
30th May 2019, 4:33 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar