<commit_before>---
layout: lab
num: lab06
ready: false
desc: "Accumulator Pattern, more TDD practice"
assigned: 2017-09-01 11:00:00.00-7
due: 2017-09-08 16:50:00.00-7
submit_cs_pnum: tbd
---

For this lab, you will create two files:

* `lab06.py`, a file containing some function definitions
* `lab06_tests.py`, a file containing some test cases

There is starter code for each of these at the following link:

* <https://github.com/ucsb-cs8-m17/lab06_starter_code>

I suggest you proceed as follows:

1.  Create a directory called ~/cs8/lab06 (using the `mkdir` command) and `cd` into that directory.
2.  Use `idle3` (you might try `idle3 &` if you want to keep your prompt handy) to bring up idle3.
3.  Use "New File" to create empty files called `lab06.py` and `lab06.py` in that `~/cs8/lab06` directory.
4.  ONE AT A TIME, copy the function definitions from the starter code, and the tests that go along with those.
   * By one a a time, what I mean is
<commit_msg>Update lab06.md<commit_after>---
layout: lab
num: lab06
ready: false
desc: "Accumulator Pattern, more TDD practice"
assigned: 2017-09-01 11:00:00.00-7
due: 2017-09-08 16:50:00.00-7
submit_cs_pnum: tbd
---

For this lab, you will create two files:

* `lab06.py`, a file containing some function definitions
* `lab06_tests.py`, a file containing some test cases

There is starter code for each of these at the following link:

* <https://github.com/ucsb-cs8-m17/lab06_starter_code>

I suggest you proceed as follows:

1.  Create a directory called ~/cs8/lab06 (using the `mkdir` command) and `cd` into that directory.
2.  Use `idle3` (you might try `idle3 &` if you want to keep your prompt handy) to bring up idle3.
3.  Use "New File" to create empty files called `lab06.py` and `lab06.py` in that `~/cs8/lab06` directory.
4.  ONE AT A TIME, copy the function definitions from the starter code, and the tests that go along with those, and get the tests to pass.
   * By one a a time, what I mean is, at your first step, copy ONLY the first function definition from  the starter code `lab06.py` and copy only the test cases from `lab06_tests.py` that go with that function definition.
   * Then, before you move on to the next function definition and <em>its</em> tests, get all of the tests from the one you just copied to pass.
   * Then, and only then, copy the next function definition and its tests into your files.
   * Repeat this until you have ALL of the function definitions and their tests, and all of them pass.
   
   
When you've done that, you are ready to try submitting to submit.cs for a final grade.  HOWEVER, you are encouraged to try submitting to submit.cs earlier, for several reasons:

* You can get partial credit if some of your tests pass for some of your functions
* You will have a backup of your file in case you accidentally delete yours from CSIL, or in case your laptop dies
* You can move code between your laptop and CSIL by downloading your code from the submit.cs submission
* You can ask the instructor or TA questions about your code on Piazza in a private instructor post.

The coding exercises work with the accumulator pattern that we've been going over in lecture and the homeworks.



{'fraction_non_alphanumeric': 0.07449139280125196, 'fraction_numerical': 0.0406885758998435, 'mean_word_length': 3.8719512195121952, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5059835', 'n_tokens_mistral': 1028, 'n_tokens_neox': 943, 'n_words': 499}