can someone explain to me how exactly this for loop is working ? how does it calculate each number? n being the number going from 2 to x ? for example how would it work out 9 ? i got the right answer for this question but I'm not 100% sure on how it works

```
`def is_prime(x):
if x == 2:
return True
elif x < 2:
return False
for n in range(2,x):
if x % n == 0:
return False
return True
```