I am new to programming, and I am not sure how to figure this out.
I want to raise an error when an integer goes over the max integer ... so I imported sys
... The max integer is 2147483647
and the min is -2147483648
. I am creating a list using the Fibonacci sequence so I tried to write some code that said:
if i > 2147483647:
print "Overflow Error"
... and likewise for the minimum value. However, it does not do anything and I am still able to list numbers past 2147483647
.
What am I doing wrong?