+ 1
Why would a number inputted as an integer be saved as a float
floats and integers
2 Respostas
+ 7
hmm, normally all inputs are strings except u convert them:
an_int_input = int(input ("Enter an integer:"))
a_float_input = float(input ("Enter a float:"))
OR
maybe u used truediv(/) on the integer, that converts it to a float
+ 3
Sometimes It's needed to "break" the number into decimals,as using to calculate a user gross and net earnings,based on some parameters.