Confused | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponse
+ 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