The Student Room Group

i want to call hello but i cant could u tell me what is wrong with this procedure

def hello():
print("hello")
hello()

Reply 1

Original post
by Palwasha11
def hello():
print("hello")
hello()

Have you indented the "print" statement correctly? It should look like:
def hello():
print("hello")
hello()

Reply 2

Original post
by jadenclubs30
Have you indented the "print" statement correctly? It should look like:
def hello():
print("hello")
hello()

If this is Python, you'll want:


def hello():
print("hello")
hello()


Grr - except for some reason the code tag isn't working on here and that print() statement isn't getting indented as it should be!!!
(edited 1 year ago)

Quick Reply