Patch 2

Move the guts of your code into a function, then you can test the function.

You may need to put the rest of the code in task 3 under an iff statement to allow the test to run - you should use:
```python
if __name__ == '__main__':
```
to prevent the program from asking for user input if being run by a test program, but allows it to work normally when run as the main program