Python Forum
How would one go about solving this question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How would one go about solving this question
#1
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
Reply
#2
You start by starting.
Reply
#3
Following Mekire, start by doing
def in_out(xs,ys,side):
Good luck!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Use Python for solving the following physics question. Python Code required ishahid 8 3,537 Dec-18-2019, 06:59 AM
Last Post: akashraj128

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020