def greet():
    print("Hello, welcome to Python programming!")
greet()

---

def function_name(parameters):
    # Code block
    return output

---

length = float(input("Enter the length: "))
width = float(input("Enter the width: "))
area = length * width
print("Area of the rectangle:", area)

---

def calculate_area(length, width):
    return length * width

length = float(input("Enter the length: "))
width = float(input("Enter the width: "))
area = calculate_area(length, width)
print("Area of the rectangle:", area)

---

import time
start_time = time.perf_counter()
length = 100.5
width = 200.5
area = length * width
print("Area of the rectangle:", area)
end_time = time.perf_counter()
time_taken = end_time - start_time
print(f"Time taken: {time_taken} seconds")

---

def greet_user(name):
    print(f"Hello, {name}!")
greet_user("Alice")

---

def greet_user(name):
    if not isinstance(name, str):
        print("Error: The input must be a string.")
        return
    print(f"Hello, {name}!")
greet_user("Alice")
greet_user((1,2,3))

---

def greet_users(*args):
    for user in args:
        print(f"Hello, {user}!")
greet_users("Alice", "Bob", "Charlie")

---

add = lambda x, y: x + y
result = add(5, 3)
print(result)

---

def add(a, b):
    return a + b
result = add(3, 5)
print(f"The sum is: {result}")
print("The sum is: ", add(4,5))

---

def get_input():
    length = float(input("Enter the length: "))
    width = float(input("Enter the width: "))
    return length, width

def calculate_area(length, width):
    return length * width

def display_area(area):
    print("Area of the rectangle:", area)

length, width = get_input()
area = calculate_area(length, width)
display_area(area)

---

def get_input():
    length = float(input("Enter the length: "))
    width = float(input("Enter the width: "))
    return length, width

def calculate_area(length, width):
    return length * width

def display_area(area, count):
    print(f"Rectangle {count}: Area = {area}")

n = int(input("How many rectangles do you want to calculate? "))
for i in range(1, n + 1):
    print(f"\nRectangle {i}:")
    length, width = get_input()
    area = calculate_area(length, width)
    display_area(area, i)
print("\nAll calculations are done!")