0

Consider the following diagram as a simplified example.

diagram

X and Y are known for point A (0,4) and point B (4,2).

Given X = 1, how would a python function look that can calculate Y for point C (1, #)?

Mkk
  • 433
  • 3
  • 8
  • https://en.wikipedia.org/wiki/Linear_function – Nick is tired Jul 04 '19 at 17:39
  • Look up [Linear interpolation](https://en.wikipedia.org/wiki/Linear_interpolation) – Thomas Jager Jul 04 '19 at 17:40
  • 1
    How is this a programming problem? If you add more context, including evidence of your work so far on the problem and a statement of just where you are stuck, this problem would be a better fit for the [Mathematics Stack Exchange](http://math.stackexchange.com/) site. – Rory Daulton Jul 04 '19 at 17:44
  • Guys, thanks for a taste of that famed stackoverflow community love. I know this is a math problem, but sometimes I find it challenging to translate simple mathematical formulas to code. Nevermind. – Mkk Jul 04 '19 at 19:18
  • You are very welcome to continue here, but you need to follow the site's guidelines. You show no work of your own in the question, and you do not explain just what your difficulty is. Is your difficulty in finding the mathematical expression? if so, you should use another site. Is your difficulty in translating the mathematics to Python code? If so, you should show us that you know the mathematical formula and show us an attempt at code on your part. Please continue here, but put more work into your questions. – Rory Daulton Jul 05 '19 at 11:21

0 Answers0