modified ex40.py and complete ex41.py with partial extra credit
finished ex41 and added ex42 and ex42a