def FloatBetweenZeroAndOne(x):
x = float(x)<EOL>if <NUM_LIT:0> <= x <= <NUM_LIT:1>:<EOL><INDENT>return x<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>".format(x))<EOL><DEDENT>
Returns *x* only if *0 <= x <= 1*, otherwise raises error.