Loading...
Implement a simple function decorator.
Decorators wrap functions to add behavior:
@decorator
def func():
pass
# Equivalent to: func = decorator(func)
Write a decorator call_counter that counts how many times a function is called.
The decorated function should have an attribute call_count that tracks the count.
The decorated function should work normally but have a call_count attribute.
Call greet twice
call_count = 2
Each call increments the counter stored on the wrapper function