While attempting to print a fibonacci series using tuples, iPython tends to crash.
Here is the code I am trying to execute.
n = raw_input("Please enter a number: ")
a = 0
b = 1
while b < n:
(b,a) = (a,b+a)
print b
However, if I replace n with a number (eg. 20, 100, 1000), it runs smoothly. I also tried to run this code in Pycharm, with similar results. Pycharm ran the code, with a huge stream on numbers being generated, and a warning which read:
Too much output to process
What causes this crash?