Code is running fine, had some queries.
def is_prime(x): if x < 2: return False elif x == 2: return True else: for i in range(2, x): if x % i == 0: return False return True
could you please explain me what this code below means? as in the instruction they had asked us range(2,x+1), but here its different.
and the return true in the last line, why didn't we put an else statement?
else: for i in range(2, x): if x % i == 0: return False return True