Question: are while and for loops the same?
Answer: While loop is used in situations where we do not know how many times loop needs to be excuted beforehand. For loop is used where we already know about the number of times loop needs to be excuted. Typically for a index used in iteration.