subject

The Buffon Needle Experiment. The following experiment was devised by Comte Georges-Louis Leclerc de Buffon (1707-1788), a French naturalist. A needle length 1 inch is dropped onto paper that is ruled with lines 2 inches apart. If the needle drops onto a line, we count it as a bit. (See Figure 10.) Buffon discovered that the quotient tries/approximates pi. For the Buffon needle experiment, you must generate two random numbers: one to describe the starting position and one to describe the angle of the needle with the x-axis. Then you need to test whether the needle touches a grid line. Generate the lower point of the needle. Its x-coordinate is irrelevant, and you may assume its y-coordinate y_low to be any random number between 0 and 2. The angle alpha between the needle and the x -axis can be any value between 0 degrees and 180 degrees (pi radians). The upper end of the needle has y-coordinate y_high = y_low + sin alpha The needle is a hit if y_high is at least 2, as shown in Figure 11.Stop after 10,000 tries and print the quotient tries/. (This program is not suitable for computing the value of pi. You need pi in the computation of the angle.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:20
In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server or network availability confidentiality integrity identity automated attack software? those who wrongfully disclose individually identifiable health information can be fined up to what amount per calendar year? single most expensive malicious attack hipaa what are script kiddies? advanced persistent threat security manager security engineer what level of security access should a computer user have to do their job what process describes using technology as a basis for controlling the access and usage of sensitive data? cybercriminal
Answers: 1
question
Computers and Technology, 22.06.2019 09:50
What is a rush associated with alcohol?
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
You know the right answer?
The Buffon Needle Experiment. The following experiment was devised by Comte Georges-Louis Leclerc de...
Questions
Questions on the website: 13722367