This is the easiest way:
x1 = float(raw_input("Enter x1: "))
Note that the function raw_input()returns a string that is converted to a floating point number with float(). If you type something other than a number, you will get an exception:
>>> float(raw_input())
a
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): a
Python 3 (, ), input raw_input.