I was making a code that uses the raw_input() function, but then the EOFError showed up. I have another code that uses raw_input(), but the error didn’t show. What did I do wrong?

Here is my code:

```
from fractions import *
print "The Leaning Tower of Lire Block Counter"
def stack(d):
a = 1
n = 1
a1 = Fraction(a, n)
a2 = Fraction(a, n * 2)
while a1 < d:
if a1 < d:
x = (a1 + a2)
a1 = x
n = n + 1
a2 = Fraction(a, n * 2)
continue
else:
break
return n
d = raw_input("Enter desired tower length: ")
print stack(d)
```

End of Code