Computer Science
How are floating constants represented in Python ? Give examples to support your answer.
Python Funda
75 Likes
Answer
Floating constants are represented in Python in two forms — Fractional Form and Exponent form. Examples:
- Fractional Form — 2.0, 17.5, -13.0, -0.00625
- Exponent form — 152E05, 1.52E07, 0.152E08, -0.172E-3
Answered By
38 Likes
Related Questions
What are literals in Python ? How many types of literals are allowed in Python ?
Can nongraphic characters be used in Python ? How ? Give examples to support your answer.
How are string-literals represented and implemented in Python ?
Which of these is not a legal numeric type in Python ? (a) int (b) float (c) decimal.