Thursday, October 2, 2025
HomeLanguagesPython program to convert exponential to float

Python program to convert exponential to float

Given a number in exponential format, the task is to write a Python program to convert the number from exponential format to float. The exponential number is a way of representing a number.

Examples:

Input: 1.900000e+01
Output: 19.0

Input: 2.002000e+03
Output: 2002.0

Input: 1.101020e+05
Output: 110102.0

Approach:

  • First, we will declare an exponential number and save it in a variable.
  • Then we will use the float() function to convert it to float datatype.
  • Then we will print the converted number.

Syntax:

float(x)

The float() method is used to return a floating-point number from a number or a string.

Example:

Python3




# Python program to convert exponential to float
  
# Declaring the exponential number
exp_number = "{:e}".format(110102)
  
# Converting it to float data type
float_number = float(exp_number)
  
# Printing the converted number
print("Exponent Number:",exp_number)
print("Float Number:",float_number)


Output:

Exponent Number: 1.101020e+05
Float Number: 110102.0
RELATED ARTICLES

Most Popular

Dominic
32330 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11867 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11926 POSTS0 COMMENTS
Shaida Kate Naidoo
6816 POSTS0 COMMENTS
Ted Musemwa
7078 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6774 POSTS0 COMMENTS