This question asks to make a code that can follow this instruction:
"For number K, if one of its factors are strictly less than the required L, your program should output “BAD p”, where p is the smallest factor in K. Otherwise, it should output “GOOD”."
code:
k, l = map(int,input().split())
for i in range(2,int(l)):
if(int(k) % i == 0):
print("BAD", i)
exit()
print("GOOD")
k, l = map(int,input().split())
for i in range(2,int(l)):
if(int(k) % i == 0):
print("BAD", i)
exit()
The exit() code that is used is a function that ends entire programm instead of just stopping the repearing function
print("GOOD")
Thank you for reading the article!