Python Forum
How would one go about solving this question - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: How would one go about solving this question (/thread-5290.html)



How would one go about solving this question - samiraheen - Sep-27-2017

Write a function  in_out(xs,ys,side) that takes three numbers as input, where side is non-negative. Here xs and ys represent the x and y coordinates of the bottom left corner of a square; and side represents the length of the side of the square. (Notice that xs, ys, and side completely define a square and its position in the plane). Your function should first prompt the user to enter two numbers that represent the x and y coordinates of some query point. Your function should print True if the given query point is inside of the given square, otherwise it should print False. A point on the boundary of a square is considered to be inside the square


RE: How would one go about solving this question - Mekire - Sep-27-2017

You start by starting.


RE: How would one go about solving this question - Saka - Sep-27-2017

Following Mekire, start by doing
def in_out(xs,ys,side):
Good luck!