Python Forum

Full Version: How would one go about solving this question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
You start by starting.
Following Mekire, start by doing
def in_out(xs,ys,side):
Good luck!