Okay. So I have tried everything. I have read through other questions and their solutions. I have added a flag. And nothing is working. I used to be able to get all the way to 4 without getting a logic error. So here's the code I have so far.
def is_prme(x): flag = 0 if x < 2: flag = 0 else: for n in range(2, x-1): if x % n != 0: flag = 1 else: flag = 0 if flag == 0: return False elif flag == 1: return True
I know the flag variable isn't technically necessary, but it was the only way for me to get anything returned at all.
Please Help Me