Find the value for area of the circle if diameter is given
are you sure?? O_o
Radius or diameter ?
Test suite does not correspond to question.
yes... I also think test suite is wrong...
I think the test suite is definitely basing it on the radius as the input and not the diameter
The problem means "radius" although it says diameter.
Diameter = 2 * radius
The test suite is misleading, instead of 'diameter', it is supposed to be 'radius'. The area can be calculated this way easily, too: A=(d^2)*pi/4, but it would be another task.
bad test. to get the test answer you must square the diameter and multiply it by pi, intead of pi*r^2(or pi*d/2^2)
For this problem, you have taken x as diameter, but answer is correct when you take x as radius. So, please improve your correct answer code.
i think, the question should be updated.It should be written radius instead of diameter....
Hi,
the area of a circle is defined by:
A = (pi)*(r^2)
--> for d = 2 like in your test suite that means:
r = d/2 --> r=1
--> r^2 = 1
--> multplied by pi = 1*pi
so A(d=2) = A(d/2) = A(r) = r^2 * pi = 1^2 * pi = 1 * pi = pi
not 4*pi like your solution suggests.
Your solution would be correct for R=2 - not D=2 - you should correct this. Ether you change the description that the diameter is given (should be radius to be correct) or you change the Test suite inm order to give correct results.
best regards
Stephan
The test suite is incorrect. It is either the surface area of a sphere given the diameter or the area of a circle given a radius.
Please correct the problem. According to the test case it's the radius that is given, not the diameter...
nice try
This user (ALBERT ALEXANDER STONIER) appears to have gamed the system, with fraudulent "likes" of this unremarkable solution submitted by 'sock-puppet' accounts. —DIV
I think , test suite is wrong according to the question statement.
Did you mean "the area of a sphere?"
More test cases need to be added.
1246 Solvers
Implement simple rotation cypher
770 Solvers
284 Solvers
Switch matrix to a column vector
173 Solvers
272 Solvers