[Type A] Python Revision Tour-1 – Chapter 1

|
Table of Contents

6. How are floating constants represented in Python?

Floating-point constants in Python can be represented using decimal notation or scientific notation. For example:

# Decimal notation
f1 = 3.14
# Scientific notation
f2 = 2.5e2  # equivalent to 2.5 * 10^2
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *