Created
June 29, 2021 16:15
-
-
Save TanjimReza/5dac4fd8e9260b0a94e311df3f25b403 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
# a = 2 | |
# b = 4 | |
a = int(input("Enter a:")) | |
b = int(input("Enter b:")) | |
q1 = int(input("Enter q1:")) | |
q2 = int(input("Enter q2:")) | |
r1b1 = -1*b | |
r1a1 = -1*a | |
r2b2 = b | |
r2a2 = -1*a | |
x = (9000000000*q1*r1b1) + (9000000000*q2*r2b2) | |
r1_total = math.sqrt(a*a + b*b) | |
lower = r1_total * r1_total *r1_total | |
xCo = math.floor(x/lower) | |
y = (9000000000*q1*r1a1) + (9000000000*q2*r2a2) | |
yCo = math.floor(y/lower) | |
print(f"X: {xCo} \nY: {yCo}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment