Python error


#1

can’t believe i’m stumped on something so simple but anyone know what is going on here?

def hello(greeting):

Traceback (most recent call last):
File “Code”, line 1
def hello(greeting):
^
IndentationError: expected an indented block


#2

The signature line cannot be a standalone object. There needs to be at least one indented line to indicate the code block

def hello(greeting):
    # code block indented four spaces each line

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.