id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

For Loopsfor_loop2

prev  |  next  |  chance
def for_loop2(x):
    result = 0
    for i in x:
        if i == 'a':
            result += 1
    return result
Function Call  Return Value
for_loop2('athenian')
for_loop2('apples')
for_loop2('hello')
for_loop2('')
for_loop2(' ')
for_loop2('alphabet')

Experiment with this code on Gitpod.io

⬅ Back