CodeNewbie Community 🌱

charles madhuku
charles madhuku

Posted on

python loops

Using exactly three loops print 10 A's, followed by 5 copies of BCD, followed by one E, followed by 15 F's on the same line using python

Latest comments (2)

randy27 profile image
Randy Gomez
res = ''
for i in range(1, 11):
    res += 'A'

for i  in range(1, 7):
    if i == 6:
        res += 'E'
       res += 'BCD'

for i in range(1, 16):
    res += 'F'

Enter fullscreen mode Exit fullscreen mode
dastiles profile image
charles madhuku

Thank u