Added python code for questions