okay so I am trying to see if a number is greater than 1 less than 0 or equal to nothing then to exit. here is what I have so far.
def main():
print("This program illustrates a chaotic function")
x = raw_input("Enter a number between 0 and 1: ")
if x == "" or x < 0 or x > 1:
print("bad person")
exit()
else:
x = eval(x)
for i in range(10):
x = 3.9 * x * (1-x)
print(x)
main()
raw_input()
my code keeps printing bad person when I type in 0.5 even though that is greater that 0 and less than 1. I feel like this is some stupid error but i dont know. Any help would be great. Thanks