(Solved)HELP - Shape Code Project | Sololearn: Learn to code for FREE!

0

(Solved)HELP - Shape Code Project

My code don't pass the test case #3, anyone know why? https://code.sololearn.com/cEQyR9BdipZF/?ref=app

6/16/2021 5:51:23 PM

Érika 👻

2 Answers

New Answer

+1

Érika 👻 Problem is here: Math.PI * (width * width) You have to first multiply width with Math.PI then multiply result with width because of less precision issue in 3rd test case. So just remove paranthesis ( and ) and write like this: Math.PI * width * width

0

width*width*Math.PI did not work on #3 either. I learned a×b=b×a !