problem40.py added