Python Program to Convert Float to Exponential
Last Updated :
13 Dec, 2025
Given a floating-point number, the task is to convert it into its exponential (scientific) notation format.
For Example:
Input: float = 200.2
Output: 2.002000e+02
Let’s explore different methods to convert a float to exponential.
Using f-strings
This method formats the float directly inside an f-string using the ":e" format specifier, which converts the numeric value into exponential notation.
Python
n = 1101.02
res = f"{n:e}"
print(res)
Explanation: f"{n:e}" applies the e format code on the value of n, producing exponential form.
This method uses the built-in format() function, passing the float and the "e" format code, which instructs Python to produce exponential notation.
Python
n = 1101.02
res = format(n, "e")
print(res)
Explanation: format(n, "e") converts n using the "e" formatting token.
The placeholder {:e} is placed inside the string, and .format() supplies the float value, causing the conversion to exponential form.
Python
n = 1101.02
res = "{:e}".format(n)
print(res)
Explanation:
- "{:e}" indicates that the inserted value should use exponential formatting.
- .format(n) inserts the value into the placeholder and applies the format code.
Using Uppercase Scientific Notation
Using "E" instead of "e" formats the float into exponential notation with an uppercase exponent symbol.
Python
n = 1101.02
res = f"{n:E}"
print(res)
Explanation: "E" formats the number like "e" but produces output in E+XX format.
Explore
Python Fundamentals
Python Data Structures
Advanced Python
Data Science with Python
Web Development with Python
Python Practice