This is the simplest Python experiment. You can enter your name and the program will greet you.
def hello(name: str) -> str:
"""Greet the specified person"""
return f"Hello, {name}!"
# Usage Example
result = hello("World")
print(result) # Output: Hello, World!Function Definition: Use def keyword to define a function
Type Annotation: name: str and -> str provide type hints
f-string: Use f"" for string formatting
API Call: Click "Call API" button sends requests to the FastAPI backend