added ex41.py
added and completed ex41.py