Python Functions, Packing, and Unpacking Getting Info In and Out of Functions Functions with Arguments and Returns

Katarzyna Wójtowicz
PLUS
Katarzyna Wójtowicz
Courses Plus Student 2,606 Points

Why does it say that the variable "hello" was not set?

Could you please let me know what I'm doing wrong here and why it says that the variable was not set? Thx in advance for your time!

creating_functions.py
def hello_student(name):
    hello = 'Hello ' + name
    return hello

print (hello_student('Ash'))

1 Answer

Katarzyna Wójtowicz
PLUS
Katarzyna Wójtowicz
Courses Plus Student 2,606 Points

I just found the reason, now it's ok :)

def hello_student(name): return 'Hello ' + name

hello = (hello_student('Ash'))