Back to List
Hello World Experiment
This is the simplest Python experiment. You can enter your name and the program will greet you.
Python Code:
def hello(name: str) -> str:
"""Greet the specified person"""
return f"Hello, {name}!"
# Usage Example
result = hello("World")
print(result) # Output: Hello, World!Try it out:
🔗 Backend API Calls
💡 Learning Points:
Function Definition: Use
defkeyword to define a functionType Annotation:
name: strand-> strprovide type hintsf-string: Use
f""for string formattingAPI Call: Click "Call API" button sends requests to the FastAPI backend
Next.js API Routes: Click "Call Next.js API" button calls Next.js API within the same project, demonstrating full-stack development