Ugrás a fő tartalomra
← KurzusokFastAPI ProductionModule 0 · Before you startPrerequisites — what you should know before this trackpredict1 / 105
+25 XP
Feladat🌐 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.
Találd ki a kimenetet

Olvasd el a kódot figyelmesen

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__)

Mit ír ki a program? Írd ide:

💬 Beszélgetés

Légy az első — tegyél fel kérdést vagy oszd meg egy tippet.
Jelentkezz be hogy csatlakozz a beszélgetéshez. Az olvasás ingyenes.
Beszélgetés betöltése…