- Zybooks 1 Q A My Library Csci 132 Introduction To Python Home 2 9 Math Module Assign Point Dist With The Distance Be 1 (29.13 KiB) Viewed 72 times
zyBooks 1 Q A My library> CSCI 132 Introduction to Python home > 2.9: Math module Assign point dist with the distance be
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
zyBooks 1 Q A My library> CSCI 132 Introduction to Python home > 2.9: Math module Assign point dist with the distance be
zyBooks 1 Q A My library> CSCI 132 Introduction to Python home > 2.9: Math module Assign point dist with the distance between point (x1, y1) and point ( Distance = SquareRootOf( (x2-x1)² + (y2-y1)²). Sample output with inputs: 1.0 2.0 1.0 5.0 Points distance: 3.0 1 import math 2 3 x1 float(input()) 4 yl float(input())) 5 x2= float(input()) D 6 y2 float(input()) 7 8 Point dist= math.sqrt(math.pow(x2-x1, 21+math.powly2-y 9 10 print('Points distance:', point_dist) Run X Not all tests passed X Test aborted Exited with return code 1. Traceback (most recent call last): File "main.py", line 10, in <module> prist/¹Points distance @ 2 W S 43 3 E D 4 R LL 2 5 T (² 6 Y & 7