added script for question1.php
Completed Question2 function