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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

computational methods 

1) Consider these four numbers
Int A =
Int B26173 5 8
Fit A = 0.0073
FH B = 51.2
By using various combinations of these
numbers, construct the following four lines:
9. "Alpha = 5120 Beta = 4
b. "Alpha = 4.00000 Betac 0.01
C. "Alpha = 7.3 e-03
-7.3e-03 Beta 26,173e+05 ")
d "Alpha= 6.2e+05 Beta = 5e+01
1
5
In each case, besides presenting the
the appropriate Pyton code, also
briefly discuss if such a number formatting
is recommended. In all cases, spacing
giver by tabbing.
Transcribed Image Text:1) Consider these four numbers Int A = Int B26173 5 8 Fit A = 0.0073 FH B = 51.2 By using various combinations of these numbers, construct the following four lines: 9. "Alpha = 5120 Beta = 4 b. "Alpha = 4.00000 Betac 0.01 C. "Alpha = 7.3 e-03 -7.3e-03 Beta 26,173e+05 ") d "Alpha= 6.2e+05 Beta = 5e+01 1 5 In each case, besides presenting the the appropriate Pyton code, also briefly discuss if such a number formatting is recommended. In all cases, spacing giver by tabbing.
Expert Solution
Step 1

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))

 

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education