simple floating point example python
float_number = float(12)
print(float_number)
# Python code to demonstrate float values.
print(1.7e308)
# greater than 1.8 * 10^308
# will print 'inf'
print(1.82e308)
########
float_string = float("12")
print(float_string)
#########
answer = round(12.2 + 14.6, 1)
student_input = input("What is 12.2 + 14.6?")
if float(student_input) == answer:
print("You're right!")
else:
print("The correct answer to 12.2 + 14.6 is", answer, ".")