Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What am I doing wrong? Assign point_dist with the distance between point (x1, y1) and point (x2.72). The calculation is: Distance = SquareRootOf( (x2 -
What am I doing wrong?
Assign point_dist with the distance between point (x1, y1) and point (x2.72). The calculation is: Distance = SquareRootOf( (x2 - 1)2 + y2-y1)2) Sample output with inputs: 1.0 2.0 1.050 Points distance: 3.0 lialis 75412617096 3 x1 - float(input) 4 yi = float(input) 5 X2 - float(input) 6 y2 float(input) 7 8. Your solution goes here 9 import math 10 point_dist= 0.0 11 x1 = float(input) 12 X2= float(input) 13 y1 float(input) float(input) 15 16 point_dist= math.sqrt(x2 - 1)**2.0) + C2 : y1)**2.0) 17 print('Points distance:', point_dist) 14 y2 Run X Testing with inputs: 1.0 2.0 1.0 5.0 Output differs. See highlights below. Your output Points distance: 5.0 Expected output Points distance: 3.0 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started