user
Write a response that appropriately completes the request.

### Instruction:
Generate an algorithm to calculate letter frequency in a given sentence.

### Response:
assistant
Algorithm:

1. Initialize an empty dictionary to store results
2. Loop through the given sentence and get each letter
3. If the letter is already in the dictionary, increment the count by 1
4. If the letter is not present in the dictionary, add the letter to the dictionary and set the count to 1
5. Repeat steps 2 and 3 till the end of the sentence
6. Return the result dictionary