# Heading
## Names
* Clifford
* Brian
* Vanessa
* Eric C
* Eric D
* Luke
* Jim
* Poomijaa
* Edward
* Neelam
* Tony
* Jasmin
* Alan
* Alexander
* James
* Abigail
* Tung
* Tye
* Trong Tan
* Christian
* Vinh
## Exercise 1
```
result = []
for x in range(10):
if x % 2 == 0:
result.append(x * 2)
else:
result.append(x)
print(result)
result = [(idx*2 if idx % 2 == 0 else idx) for idx in x]
[(element * 2 if element % 2 == 0 else element) for element in x]`
a if a < b else b
```
# Exercise 2 - B. Thinking about testing
The following `set_name` function is used to set a name according to the follow requirements on input:
* First Name must be at least 3 characters, and no more than 30.
* Last Name must be at least 3 characters, and no more than 50.
* First Name can only contain letters (uppercase or lowercase), and dashes.
* Last Name can only contain letters (uppercase or lowercase), spaces, and dashes.
* Middle Name can be None, but if it's not none, it can be between 1 and 50 characters.
* Middle Name cannot be longer than the first name, and it cannot be longer than the last name.
The function returns `True` if the inputs are valid, and `False` if the inputs are invalid.
```python
def set_name(firstName, middleName, lastName):
pass
```
### Test Cases
| firstName | middleName | lastName | Result |
| --------- | ----------- | --------- | ------ |
| Valid | Valid | Valid | True |
| Wrong | Valid | Valid | False |
| Valid | Wrong | Valid | False |
| Valid | Valid | Wrong | False |
| Wrong | Wrong | Valid | False |
| firstName | middleName | lastName | Result |
| --------- | ---------- | -------- | ------ |
| 'a'*3 | 'b'*2 | 'c'*10 | True |
| 'a'*10 | 'b'*
| 'a'*30 | 'b'*30 | 'c'*30 | True |
| Text | Text | Text | Text |
| Text | Text | Text | Text |
def test_all_true():
assert set_name('a'*3, 'b'* 3, 'c'*3) == True
def test_long_30():
assert set_name('a'*30, 'b'* 30, 'c'*30) == True
def test_long_first():
assert set_name('a'*31, 'b'* 31, 'c'*31) == False
def test_long_last():
assert set_name('a'*30, 'b'* 30, 'c'*51) == False
def test_long_mid():
assert set_name('a'*31, 'b'* 32, 'c'*31) == False
def test_low():
assert set_name('a'*2, 'b'* 2, 'c'*2) == False
def test_num_first():
assert set_name('a1'*3, 'b'* 3, 'c'*3) == False
def test_num_last():
assert set_name('a'*3, 'b'* 3, 'c1'*3) == False
def test_blank_mid():
assert set_name('a'*3, '', 'c'*3) == True
def test_space_last():
assert set_name('a1'*3, 'b'* 3, 'c d'*3) == True
def test_dash_first():
assert set_name('a-t'*3, 'b'* 3, 'c'*3) == True
def test_dash_last():
assert set_name('a'*3, 'b'* 3, 'c-t'*3) == True