<commit_before>---
layout: post
author: ericabrody
title: "Erica's Chapter 3 Exercises"
---

Exercise 1: Write a program which repeatedly reads numbers until the user enters “done”. Once “done” is entered, print out the total, count, and average of the numbers. If the user enters anything other than a number, detect their mistake using try and except and print an error message and skip to the next number.
<iframe src="https://trinket.io/embed/python/e0f9320136" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Exercise 2: Write another program that prompts for a series of numbers as above and at the end prints out the maximum, minimum and average of the numbers.
<iframe src="https://trinket.io/embed/python/fee86a045b" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe><commit_msg>Updated title of post to ch 5 ex<commit_after>---
layout: post
author: ericabrody
title: "Erica's Chapter 5 Exercises"
---

Exercise 1: Write a program which repeatedly reads numbers until the user enters “done”. Once “done” is entered, print out the total, count, and average of the numbers. If the user enters anything other than a number, detect their mistake using try and except and print an error message and skip to the next number.
<iframe src="https://trinket.io/embed/python/e0f9320136" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Exercise 2: Write another program that prompts for a series of numbers as above and at the end prints out the maximum, minimum and average of the numbers.
<iframe src="https://trinket.io/embed/python/fee86a045b" width="100%" height="600" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>
{'fraction_non_alphanumeric': 0.10205213533000555, 'fraction_numerical': 0.03826955074875208, 'mean_word_length': 5.489208633093525, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '7147527', 'n_tokens_mistral': 548, 'n_tokens_neox': 496, 'n_words': 224}