Grug16/CS112-Spring2012 — comment on commit 5e88466d6b792806bc6e91a81b4bd4a157fd0361
File:  line 0
By jrabbit:

Part | Points
------------- | -------------
base | .75
Adv | 1
*Total* | 1.75

Fails some tests. :cloud:

```
======================================================================
ERROR: test_normalize_many (__main__.NormalizeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "hw08.py", line 129, in test_normalize_many
self.assertEquals(normalize((0,0,0,1)), [0.0,0.0,0.0,1.0])
File "/Users/jacklaxson/Projects/homework-cs112/Grug16/hw08/math_funcs.py", line 39, in normalize
vector[n] = vector[n] / distance
TypeError: 'tuple' object does not support item assignment

======================================================================
ERROR: test_normalize_two (__main__.NormalizeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "hw08.py", line 124, in test_normalize_two
self.assertEquals(normalize((1,0)), [1.0,0.0])
File "/Users/jacklaxson/Projects/homework-cs112/Grug16/hw08/math_funcs.py", line 39, in normalize
vector[n] = vector[n] / distance
TypeError: 'tuple' object does not support item assignment

----------------------------------------------------------------------
```

```python
if not (distance == 0):
for n,v in enumerate(vec):
vector[n] = vector[n] / distance

return vector
```
You need to create a new list to return if you're receiving a tuple, honestly thats a silly reason for this to break but its in the testcase.

```
FAIL: test_separater (__main__.OutputTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "adv_nims_tests.py", line 51, in test_separater
self.assertEquals(separater(range(1)), "-" * 22, "expected 22 -")
AssertionError: expected 22 -
```

```python
>>> import adv_nims
>>> adv_nims.separater((range(1))
... )
'======================'
>>> adv_nims.separater(range(1))
'======================'
>>> len(adv_nims.separater(range(1)))
22
```

Ok that failure is not a bad one and won't count against you.