Q. How many times is the word 'HELLO' printed in the following statement?


s = "python rocks"

for ch in s:

    print("Hello")


Answer :-

For loop will run len(s) times. So “hello” print will print 11 times.

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post