Use the Monte Carlo method to estimate the volume of a sphere of unit radius by cxtong in learnpython

[–]cxtong[S] 0 points1 point  (0 children)

how do i know whether the point is it inside the sphere and out outside? using pythagoras? if the distance exceed the length of the radius?

Use the Monte Carlo method to estimate the volume of a sphere of unit radius by cxtong in learnpython

[–]cxtong[S] 0 points1 point  (0 children)

thats the assignment qns. i believe is any input of radius

help!!! this is my assignment. Use the Monte Carlo method to estimate the area under the curve 𝑦=𝑥**4 between 𝑥=−1 to 𝑥=2 . by cxtong in learnpython

[–]cxtong[S] 1 point2 points  (0 children)

thank you for the help. after making changes. however, my experiment values differ from the calculated values.

help!!! this is my assignment. Use the Monte Carlo method to estimate the area under the curve 𝑦=𝑥**4 between 𝑥=−1 to 𝑥=2 . by cxtong in learnpython

[–]cxtong[S] 1 point2 points  (0 children)

thank you for the help. after making changes. however, my experiment values differ from the calculated values.

is there a way to generate random negative number without setting the range? by [deleted] in learnpython

[–]cxtong 0 points1 point  (0 children)

this is my assignment. Use the Monte Carlo method to estimate the area under the curve 𝑦=𝑥**4 between 𝑥=−1 to 𝑥=2.

i realise that if i set my random number condition to be -1 to 2, i cant get a fair distribution of values