Stuff
public text v1 · immutable
while True:
number = raw_input("enter a float: ")
try:
x = float(number)
except ValueError:
print "Bad input!"
continue
else:
break # Leave the loop if no ValueError was raised
print x