Functions

def greet():
    print("Hello, how are you?")
greet()  # Output: "Hello, how are you?"
Hello, how are you?
def greet(name):
    print("Hello, " + name + "! How are you?")
greet("John")  # Output: "Hello, John! How are you?"
Hello, John! How are you?
def add_numbers(a, b):
    return a + b
result = add_numbers(5, 3)
print(result)  # Output: 8
8
CTRL + ENTER to send