#πŸ”’ Points of Reflection

10 messages Β· Page 1 of 1 (latest)

queen tree
#

Given two points P and Q, output the symmetric point of point P about Q. Each argument is a two-element array of integers representing the point's X and Y coordinates. Output should be in the same format, giving the X and Y coordinates of point P1. You do not have to validate the input.

ivory monolithBOT
#

@queen tree

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

queen tree
#

i dont really know what to do

deft lava
#

Looks more like a maths problem. You need to make a solution to the problem first, then code that solution, maybe by using Python

#

Start without coding, just solving this problem with simple cases, then generalise the solution, find edge cases, and once you've found a solution, code it

subtle lintel
#

as has been said this is a math question, you should find the exact code to program this by just writing out the work for the problem

#

the symmetric point P' for P about Q is Q - rT where r is the distance and T is the direction from Q to P

in simpler terms, calculate the change in x and the change in y, from Q to P. the symmetric point is the same differential in the opposite direction. if you go 3 units left and 4 units up, the symmetric point is 3 units right and 4 units down

queen tree
#

alr

ivory monolithBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.