请问这个程序到底哪里出现了错误,为什么结果显示result is not defined

img


请问这个程序到底哪里出现了错误,为什么结果显示result is not defined

m,result都没有申明么,break放后面

from math import sqrt

m=6
i = 2
result = 'True'   

while i <= sqrt(m):
    if m % i == 6:
        result = 'True'
        break
    else:
        result = 'False'
    i += 1

print(result)