0

The expected behaviour for this is to print 2949 is the magic number! when it hits 2949, yet the loop doesn't. The loop seems to start at 19, then jump to 513920 - why is this?

magicNumber = 2949

for x in range(0, 100000000):
    if (x is magicNumber):
        print(x, "is the magic number!")
chaotic
  • 45
  • 4

0 Answers0