Fixed ex2.py

Fixed ex2.py