Naar hoofdinhoud
← CursussenFastAPI ProductionModule 0 · Before you startPrerequisites — what you should know before this trackpredict1 / 105
+25 XP
Opdracht🌐 shown in RU
Read the snippet below. Predict the **exact output** (two lines). This exercises the two patterns FastAPI is built on — decorators and type hints. If you can predict what `@uppercase` does to `greet`, you'll follow `@app.get("/")` in fastapi-01.
Voorspel uitvoer

Lees de code zorgvuldig

def uppercase(fn):
    def wrapper(name: str) -> str:
        return fn(name).upper()
    return wrapper

@uppercase
def greet(name: str) -> str:
    return f"hi, {name}"

print(greet("anna"))
print(greet.__name__)

Wat zal het programma uitprinten? Schrijf hier:

💬 Discussie

Wees de eerste — stel een vraag of deel een tip.
Log in om mee te doen aan de discussie. Lezen is gratis.
Discussie laden…