Update homework.py

q2 - http://www.codeskulptor.org/#user34_NsI6bIrSa6_14.py