#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python solutions for Prof. Dhande's homework first problem (week 2). """ print "Problem #1 : check if a point is in a square work space [-100, 100] x [-100, 100]." xmin, xmax = -100, 100 ymin, ymax = -100, 100 print "Please give the point P:" x = input("Give me the x coordinate for P : x = ") y = input("Give me the y coordinate for P : y = ") if (xmin <= x <= xmax) and (ymin <= y <= ymax): print "Yes, the point P is inside the workspace :) !" else: print "No, the point P is not inside the workspace :( ..."