Comparision between For and While Loops

ForΒ 
Loop
ForΒ 
loopΒ 
isΒ 
usuallyΒ 
calledΒ 
aΒ 
CountingΒ 
loop
,Β 
becauseΒ 
weΒ 
specifyΒ 
theΒ 
numberΒ 
ofΒ 
timesΒ 
weΒ 
wantΒ 
toΒ 
runΒ 
theΒ 
loopΒ 
beforehand.
for val in string:
        <statement(s)>
WhileΒ 
loop
WhileΒ 
loopΒ 
isΒ 
usuallyΒ 
calledΒ 
aΒ 
conditionalΒ 
loop
Β 
becauseΒ 
itΒ 
dependsΒ 
onΒ 
aΒ 
condition.Β 
ItΒ 
runsΒ 
asΒ 
longΒ 
asΒ 
theΒ 
conditionΒ 
remainsΒ 
true,Β 
andΒ 
itΒ 
breaksΒ 
whenΒ 
theΒ 
conditionΒ 
becomesΒ 
false.
while <condition>:
    <statement(s)>
for x in "banana":
  print(x)
master = 'ZOG'
index = 0
while index < len(master):
    letter=master[index]      
    print(letter)
    index=index+1