1. Home
  2. >
  3. Hello world
25

Hello world
Vani Desai Vani Desai

for loop runs 5 times and hence calls the function say_hello() five times. Thus printing “Hello, World” 5 times.

# python
def say_hello():
    print ('Hello, World')

for i in range(5):
    say_hello()

Discussions (9)

Hello, world Hello, world Hello, world Hello, world Hello, world

  • 0
  • Reply

Hello, world Hello, world Hello, world Hello, world Hello, world

  • 0
  • Reply

Hello, World

  • 0
  • Reply
Candidate Image

Hello, world Hello, world Hello, world Hello, world Hello, world

  • 0
  • Reply
Candidate Image

Hello, world Hello, world Hello, world Hello, world Hello, world

  • 0
  • Reply

Hello world 5 times

  • 0
  • Reply

Hello, world

  • 0
  • Reply

Hello, world Hello, world

  • 0
  • Reply

print Hello, world 5 times

  • 0
  • Reply
# python