Which fix removes the bug?
def greet():
return 'hi'
print(greet)
- Add
global greetfirst - Change return to print
- Rename it to
Greet - Print
greet()instead
Without the parentheses the function object itself is printed, not its result.
Play Problem Solving ▸