Consider these four numbers. Int B2617358 Flt A = 0.0073 Fit B = 51.2 By using various combinations of these numbers, construct the following four lines: "Alpha = 51.20 Beta = 4 "Alpha = 4.00000 SCINA 11 12 Betac 0.01 Bota 36 1730 +05 1)
computational methods
source code :-
# here importing the math modules
import math
# given Number in question.
A = 4
B = 617358
C =0.0073
D = 51.2
# making four points from these number as shown and taken in qustion.
point_A = [D,A]
point_B = [A,C]
point_C = [C,B]
point_D = [B,D]
# printing the above point
print(point_A)
print(point_B)
print(point_C)
print(point_D)
# now with the help of these above point find four different line using different points.
# here using sqrt() , pow() function from math modules
lineAB = math.sqrt(pow((point_A[0] - point_B[0]),2) + pow((point_A[1] -point_B[1] ),2))
lineBC = math.sqrt(pow((point_B[0] - point_C[0]),2) + pow((point_B[1] -point_C[1] ),2))
lineCD = math.sqrt(pow((point_C[0] - point_D[0]),2) + pow((point_C[1] -point_D[1] ),2))
lineDA = math.sqrt(pow((point_D[0] - point_A[0]),2) + pow((point_D[1] -point_A[1] ),2))
# printing the four line with round up function upto 2
print("The line between point- A and B is : ",round(lineAB,2))
print("The line between point- B and C is : ",round(lineBC,2))
print("The line between point- C and D is : ",round(lineCD,2))
print("The line between point- D and A is : ",round(lineDA,2))
Step by step
Solved in 2 steps with 2 images