<jupyter_start><jupyter_text><jupyter_code># Python code to count the number of each letter in a sentence
# Written by <NAME>
def char_frequency(str1):
    dict = {}
    for i in sentence:
        keys = dict.keys()
        if i in keys:
            dict[i] += 1
        else:
            dict[i] = 1
    return dict
sentence = input()
print(char_frequency(sentence))<jupyter_output>mehmet ali altıntaş
{'m': 2, 'e': 2, 'h': 1, 't': 3, ' ': 2, 'a': 3, 'l': 2, 'i': 1, 'ı': 1, 'n': 1, 'ş': 1}
{'fraction_non_alphanumeric': 0.1710794297352342, 'fraction_numerical': 0.028513238289205704, 'mean_word_length': 2.727272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '310148', 'license': 'Apache-2.0', 'n_tokens_mistral': 206, 'n_tokens_neox': 187, 'n_words': 62, 'path': 'Frequency_of_letters_in_a_sentence.ipynb', 'repo_name': 'mehmetalibey-GitHub/Python-Assignments', 'size': '504'}