Can I write a sub-method/function to call in my solution (python) and how?

I've always read that we should write modular code. I don't know if it is necessary/encouraged...but for the problems here, can we define another function/method which is called by the main method we are filling in? If so, how?

I am using Python 3. Thank you!

Comments (1)