I wrote code to write the fibonacci sequence till the elements did not exceed 40. But when I run it, it displays nothing and keeps running forever. Also when I run it, my laptop's temperature rises to 90 degree Celsius and when I stop running it, the temperature falls back to normal. (I have Nitro Sense.)
Here is the code:
x=0
while x <= 40:
m = [1, 2]
x = m[-1] + m[-2]
m.append(x)
print(m)