2026fa_cse160/homework/homework04/input/input03.py

8 lines
292 B
Python

print("This program converts the input to a float\n")
data1 = input("Enter an float value for data1: ")
print(f"The type of data1 is {type(data1)} at input")
data1 = float(data1)
print(f"The type of data1 is {type(data1)} after conversion to float")
print(f"The value of data1 is {data1}")