+ 2

Challenge not easy

this time geometry will help ask the user two input as a coordinate (x,y) and show a line passing from (3.5,2.1) to (x,y) in xy plane and also tell the distance between two points

11th Jan 2018, 9:34 PM
Arun
3 Answers
0
#enter x coordinate #enter y coordinate import math foo = int(input()) bar = int(input()) def distanceFinder(x,y): x -= 3.5 y -= 2.1 x **= 2 y **= 2 spam = x + y distance = math.sqrt(spam) print(distance) distanceFinder(foo,bar)
12th Jan 2018, 3:22 PM
Da Cube
Da Cube - avatar
- 1
can u send a full code
12th Jan 2018, 4:09 PM
Arun
- 1
can u send a full code
12th Jan 2018, 4:10 PM
Arun