This seems like really simple code but for some reason it just won't work. I need to output a value at certain times but the if statement doesn't seem to be evaluating. The following is the basic version of what I'm trying to do.

```
dt=.1

while t<=10:
     if t==5:
          print('yes')
     t+=.1

```

I've literally tried this in my code and I've even had it print t for every time step but it will not print 'yes.' I have other if statements in my code for an interval like

```
if 10<=t<60:
     do stuff

```

and these if statements run perfectly. I've tried `t==5.0` and `t==float(5)` just in case it needed that but it didn't work either. This is driving me crazy so if someone could please help me out that'd be great. I'm running this in Spyder on Ubuntu 12.4 and I've been getting a message saying `import sitecustomize` failed. Would this have anything to do with it? I've been running code for a while now with that message and it hasn't caused any problems before.

*Edit*

Got it to work, I used

```
if int(t)==5 and t<5+dt:

```

Thanks for the help