Computers and Technology

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.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, 890777
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, jared2461
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
image
Computers and Technology, 24.06.2019 10:20, Cobetate
Multiple choice project create a program with two multiple choice questions. 1. users have two attempts only, show attempt number each time. hint: while loop with break control. (20%) 2. only one correct answer for each question, use switch case for each question. (20%) 3. show total score after the two questions are answered. hint: . (20%) 4. user have options to answer the two questions again if first attempt score is not 100%. hint: if statment. (20%) 5. use string method .toupper() to allow users to enter with lowercase or uppercase letters. (20%) 1. where is the capital of the state of florida? a. orlando b. tallahassee c. miami d. tampa b 2. where is walt disney world park located in florida? a. orlando b. tallahassee c. miami d. tampa a
Answers: 1
Do you know the correct answer?
The Buffon Needle Experiment. The following experiment was devised by Comte Georges-Louis Leclerc de...

Questions in other subjects: