Computer Applications
What is meant by a floating-point literal in Python ? How many ways can a floating literal be represented into ?
Python Funda
5 Likes
Answer
Floating point literals represent real numbers and are written with a decimal point dividing the integer and fractional parts.
Floating literals are represented in Python in two forms —
- Fractional Form — 2.0, 17.5, -13.0, -0.00625
- Exponent form — 152E05, 1.52E07, 0.152E08, -0.172E-3
Answered By
2 Likes