ex5.py & ex6.py

ex5.py reworked and added ex6.py