Why have we used flag?

so i want to know why do we need to use flag?
qnd why we not mentioned the condition of if in while itself?

Hey @stormborn
Ques why do we need to use flag
Answer : flag will be a track of number is prime or not
my flag is true initially
after the while loop completion
flag is true that means. number is prime