<commit_before>---
num: "h04"
desc: "Guttag, Chapter 4"
ready: true
assigned: 2016-08-03 09:00:00.00-7:00
due: 2016-08-04 09:00:00.00-7:00
---


Please read Chapter 4 in the Guttag textbook, then answer these questions.

<ol>

<li markdown="1" style="margin-bottom:8em;">

(20 pts) On p.&nbsp;34, Guttag contends that you can solve any problem that is computationally solvable using the programming constructs from Chapters&nbsp;1-3. List four main reasons for using *functions* in your program. Write your answer based on your entire reading of Chapter&nbsp;4, rather than the arguments provided by Guttag on p.&nbsp;34 alone.

</li>



<li markdown="1" style="margin-bottom:8em;">

(20 pts) What is a function specification and why is it used in programming?

</li>


<li markdown="1" style="margin-bottom:10em;" >

(20 pts) Explain via an example the basic ingredients of a recursive function implementation. Try to use an example that is different from those used in your reading.<commit_msg>Update h04.md<commit_after>---
num: "h04"
desc: "Guttag, Chapter 4"
ready: false
assigned: 2016-08-03 09:00:00.00-7:00
due: 2016-08-04 09:00:00.00-7:00
---


Please read Sections 4.1, 4.2, and 4.3 of the Guttag textbook, then answer these questions.

<ol>

<li markdown="1" style="margin-bottom:8em;">

(20 pts) On p.&nbsp;34, Guttag contends that you can solve any problem that is computationally solvable using the programming constructs from Chapters&nbsp;1-3. List four main reasons for using *functions* in your program. Write your answer based on your entire reading of Chapter&nbsp;4, rather than the arguments provided by Guttag on p.&nbsp;34 alone.

</li>



<li markdown="1" style="margin-bottom:8em;">

(20 pts) What is a function specification and why is it used in programming?

</li>


<li markdown="1" style="margin-bottom:10em;" >

(20 pts) Explain via an example the basic ingredients of a recursive function implementation. Try to use an example that is different from those used in your reading.
{'fraction_non_alphanumeric': 0.1054726368159204, 'fraction_numerical': 0.06517412935323383, 'mean_word_length': 4.570637119113574, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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}}
{'dir': 'git-commits-cleaned', 'id': '7264506', 'n_tokens_mistral': 723, 'n_tokens_neox': 616, 'n_words': 269}