Edited ex17.py and Added ex18.py

ex18.py - functions
Added ex19.py

functions