<commit_before>---
layout: post
author: hannahlwang
title: "Hannah's Dictionary Exercises"
---

After being sick last week, this is my *attempt* at the pair dictionary exercises. I was able to figure out the first couple, but the dictionary of dictionaries part was really difficult, and I couldn't find them covered in the reading. I attempted the total transactions section, but the totals don't seem to actually be the true totals, so I'm not quite sure how to make that work. I'm hoping that I will be able to return to these last couple questions after figuring out the whole dictionaries thing a little better.

<iframe src="https://trinket.io/embed/python3/9c25be4da5" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
<commit_msg>update Hannah's dictionary exercises<commit_after>---
layout: post
author: hannahlwang
title: "Hannah's Dictionary Exercises"
---

After being sick last week, this is my *attempt* at the pair dictionary exercises. I was able to figure out the first couple, but the dictionary of dictionaries part was really difficult, and I couldn't find them covered in the reading. I attempted the total transactions section, but the totals don't seem to actually be the true totals, so I'm not quite sure how to make that work. I'm hoping that I will be able to return to these last couple questions after figuring out the whole dictionaries thing a little better.

<iframe src="https://trinket.io/embed/python3/9c25be4da5" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Revised:

<iframe src="https://trinket.io/embed/python3/95603d62c3" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

{'fraction_non_alphanumeric': 0.08752117447769622, 'fraction_numerical': 0.02710333145115754, 'mean_word_length': 5.328571428571428, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '2140729', 'n_tokens_mistral': 523, 'n_tokens_neox': 472, 'n_words': 230}