Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
I need someone to clarify the floats...I've move past but please be my friend if you have a better way for my understanding. TY!
help with floats python
6 Answers
+ 3
floats are numbers with a decimal.
4.20, 3.1415, 6.339 etc.
Notice if you divide non float types you get a whole, rounded number. 1/3 is 1
floats make it more accurate so 1/3 = 1.33333
+ 2
Like reassigning them?
x= 2.14
y = x
y is now 2.14
And no problem. Happy to help!
+ 2
thank you!
+ 2
Happy to help!
+ 1
what about moving floats? great answer! thank you
+ 1
A Float is expressed a number as fractional value as 1.00, 2.00, 3.00, 1.5, 1.50, 1.75, 1.83, 1.333333333333 etc.
An integer means full value,it has no fraction,so it's expressed as 1, 2, 3, 4, 5, 6, 7 8, ...100 etc.
A integer can convert into float and this float is expressed as 1 to 1.0, or 1.00
A float can convert into integer by omitting It's fractional part as 1.333333 to 1, 2.75 to 2