在此任务中，您需要生成一个Python函数，该函数将输入的字符串中的每个单词的第一个字母大写，并返回修改后的字符串。
```
    text = "this is a sentence that needs to be capitalized."
    ```
以下是一个满足您的要求的Python函数：

```
def capitalize_first_letter(text):
    return ' '.join(map(str.capitalize, text.split()))
```

您可以这样调用它：

```
text = "this is a sentence that needs to be capitalized."
capitalized_text = capitalize_first_letter(text)
print(capitalized_text)
``` 

输出结果：
```
This Is A Sentence That Needs To Be Capitalized.
```