<commit_before>---
author: wookiemage
layout: post
title: Chapter Three: Flow Control Exercises
---
Here's my first exercise:
<iframe src="https://trinket.io/embed/python/01b02c1c22" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Here's the second one:
<iframe src="https://trinket.io/embed/python/04aea8e8eb" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Here's the final one:
<iframe src="https://trinket.io/embed/python/90f2e61a9a" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

I bet there is a more efficient way of doing this last one. I ended up using both a "try" and an "if". I think that if I knew a little bit more about data types and how they are evaluated in Python I could have just used one or the other.<commit_msg>Removed the colon in the title, making YAML happy.<commit_after>---
author: wookiemage
layout: post
title: Chapter Three Flow Control Exercises
---
Here's my first exercise:
<iframe src="https://trinket.io/embed/python/01b02c1c22" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Here's the second one:
<iframe src="https://trinket.io/embed/python/04aea8e8eb" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Here's the final one:
<iframe src="https://trinket.io/embed/python/90f2e61a9a" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

I bet there is a more efficient way of doing this last one. I ended up using both a "try" and an "if". I think that if I knew a little bit more about data types and how they are evaluated in Python I could have just used one or the other.
{'fraction_non_alphanumeric': 0.1304585152838428, 'fraction_numerical': 0.048034934497816595, 'mean_word_length': 5.689781021897811, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 6, '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': '2555716', 'n_tokens_mistral': 629, 'n_tokens_neox': 565, 'n_words': 205}