magicnumber = 2000 ;
for x in range(10000):
    if x is magicnumber:
        print(x,"Is the Magic Number")
        break
I need assistance.
magicnumber = 2000 ;
for x in range(10000):
    if x is magicnumber:
        print(x,"Is the Magic Number")
        break
I need assistance.
 
    
     
    
    You need to replace is with ==. And you need to read this for more understanding: Is there a difference between `==` and `is` in Python?
magicnumber = 2000 ;
for x in range(10000):
    if x == magicnumber:
        print(x,"Is the Magic Number")
        break
Output:
(2000, 'Is the Magic Number')
 
    
     
    
    if x is magicnumber:
is the same as
if x is 2000:
which returns false, therefore that condition is never met
if x == magicnumber:
is what you are looking for...
 
    
    magicnumber = 2000
for x in range(10000):
    if x == magicnumber:
        print(x,"Is the Magic Number")
        break
 
    
    