+ 1

do you help me to find problem?

help me to run this code.there is a problem i cannot find.thanks advance for help me. #formula def point_distance(x0,y0,x1,y1): distance=((((x1-x0)**2)+((y1-y0)**2))**0.5) return(distance) def triangle_area(x0,y0,x1,y1,x2,y2): a=point_distance(x0,y0,x1,y1) b=point_distance(x0,y0,x2,y2) c=point_distance(x2,y2,x1,y1) s=(a+b+c)/2 return ((s*(s-a)(s-b)(s-c))) ######### #test def test(x0,y0,x1,y1,x2,y2): print("the area of triangle with vertices "+"("+str(x0)+","+str(y0)+")"+"("+str(x1)+","+str(y1)+")"+"("+str(x2)+","+str(y2)+")"+" is "+str(triangle_area(x0,y0,x1,y1,x2,y2))) test(0,0,3,4,1,1) test(-2, 4, 1, 6, 2, 1) test(10, 0, 0, 0, 0, 10)

16th Oct 2020, 1:36 PM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
15 Réponses
0
[][] Mohan 333 thank you so much guys.i find my main problem finally and that was missing * between brackets😂😂😂.
16th Oct 2020, 2:12 PM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
+ 1
change return in triangle_area return ((s*(s-a)*(s-b)*(s-c))**0.5)
16th Oct 2020, 1:50 PM
[][]
+ 1
Done...but my problem is not solved😔 [][] https://code.sololearn.com/cq7R65OkY87d/?ref=app
16th Oct 2020, 1:58 PM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
+ 1
Md.Ruhan Chowdhury Change this return ((s*(s-a)*(s-b)*(s-c))**0.5))
16th Oct 2020, 2:00 PM
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜ - avatar
+ 1
Md.Ruhan Chowdhury #formula def point_distance(x0,y0,x1,y1): distance=((((x1-x0)**2)+((y1-y0)**2))**0.5) return(distance) def triangle_area(x0,y0,x1,y1,x2,y2): a=point_distance(x0,y0,x1,y1) b=point_distance(x0,y0,x2,y2) c=point_distance(x2,y2,x1,y1) s=(a+b+c)/2 return ((s*(s-a)*(s-b)*(s-c))**0.5) ######### #test def test(x0,y0,x1,y1,x2,y2): print("the area of triangle with vertices "+"("+str(x0)+","+str(y0)+")"+"("+str(x1)+","+str(y1)+")"+"("+str(x2)+","+str(y2)+")"+" is "+str(triangle_area(x0,y0,x1,y1,x2,y2))) test(0,0,3,4,1,1) test(-2, 4, 1, 6, 2, 1) test(10, 0, 0, 0, 0, 10)
16th Oct 2020, 2:05 PM
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜ - avatar
+ 1
you didn't add * between brackets
16th Oct 2020, 2:06 PM
[][]
+ 1
Oyelola Pamilerin Kabir sorry.I know c++ and python but not java.You started to learn Java and that's not my side. Feel free always if need any help😊. But never say anyone for their private info like number,password or anything private issues.Thats the violation of rules & regulations of sololearn and may banned your account from authority. Feel free and share your thoughts.😊😊😊
18th Oct 2020, 11:47 AM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
0
Mohan 333 done already.see my last comment
16th Oct 2020, 2:02 PM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
0
it works for me, i just changed return https://code.sololearn.com/c32vzNJpM86N/?ref=app
16th Oct 2020, 2:05 PM
[][]
18th Oct 2020, 11:18 AM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
0
Oyelola Pamilerin Kabir you are a beginner.So learn first.Then work.😊
18th Oct 2020, 11:40 AM
Md.Ruhan Chowdhury
Md.Ruhan Chowdhury - avatar
0
that what i want you to help me out with
18th Oct 2020, 11:42 AM
Oyelola Pamilerin Kabir
0
i want you to teach me how to learn here
18th Oct 2020, 11:42 AM
Oyelola Pamilerin Kabir
0
Alright thanks
18th Oct 2020, 11:48 AM
Oyelola Pamilerin Kabir
- 2
i want to work with you
18th Oct 2020, 11:38 AM
Oyelola Pamilerin Kabir