You are cutting off a piece of pie like this, where c is the length of the straight part (called the chord length) and h is the height of the piece.
There is an approximate formula for the area:
However, h is not so easy to measure, whereas the diameter d of a pie is usually well-known. Calculate the area where the diameter of the pie is 12 inches and the chord length of the segment is 10 inches. Generalize to an
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Big Java Late Objects
Additional Engineering Textbook Solutions
Starting Out with Java: Early Objects (6th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Concepts of Programming Languages (11th Edition)
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Problem Solving with C++ (10th Edition)
- Write a triangle (x0, y0, x1, y1, x2, y2) function to draw the triangle with vertices (x0, y0), (x1, y1), and (x2, y2). Use your function to draw some triangles. www..arrow_forwardThere is more than one way to calculate the value of T. One way that this can be done is by generating random numbers. This works by recognizing that if you take a unit square that you can draw a quarter circle of unit radius inside the square. The area of the quarter circle is exactly π/4 and the area of the square is 1. So if you randomly generate a pair of uniform numbers between 0 and 1 they will be distributed uniformly across the square. If you count the total number of points generated and the number of points (x, y) where x² + y² = ² < 1 then the ratio of those two numbers will tend towards the ratios of the areas of the square and the circle as the number of points generated increases. The ratio of the areas is just π/4 so if you take that ratio and multiply it by 4 you get an estimate for . a) b Write code to estimate π using this method. You can generate random numbers in the range 0arrow_forwardIf you are driving across the border into Canada, it is difficult with the road signs in KPHvalues. In Canada, the Kilometers Per Hour scale is used to measure speed. In the USA, theMiles Per Hour scale is used. For example, a speed limit of 50 MPH in Vermont is 80.47 KPHin Montreal. A speed limit of 60 KPH in Toronto is 37.28 MPH in Buffalo, NY. You’d likeyour computer or smartphone to convert between the Speed limit signs so you do not get aticket.arrow_forwardProgram a simplified Galton board in python. It is required that: The user must select the number of rows n of the board The distribution resulting from dropping the beads should be displayed on the screen. Display an animation where the number of rows n increases over time.All resulting distributions must be scaled to the interval [0, 1], so that it is possible toappreciate the convergence to the normal distribution. Consider n from 1 to 80.arrow_forwardPython, Please use Spyderarrow_forwardA hardware store is selling steel rods of various lengths. However, customers sometimes want to buy rods that the store doesn't carry. For example, if the store only carries 10cm and 30cm rods and a customer wants to buy a 25cm rod, then the order cannot be fulfilled. To boost sales, the store has come up with an idea to weld two rods together to make a longer rod. For example, if the store only carries 3cm and 5cm rods and a customer wants to buy a 8cm rod, then the order can be fulfilled by welding together 3-cm and 5-cm rods. Since rod welding can compromise the strength, the store will only weld up to TWO rods together. More precisely, this means, an order for x cm can be fulfilled if there is a single rod of length x or there are two rods (potentially of the same length) whose combined length is x. Your Task: Write a function process Orders (orders: List[int], sizes:List[int]) -> List[bool] to determine whether or not each of the given orders can be fulfilled. Here, orders is a…arrow_forwardWe would like to find the minimum number of steps required to get 0 from any number, when you can only subtract a digit present in that number in a single step. For example, if you are given 25. Then you can either subtract 2 or 5 from 25. Let's subtract 5 then we will get 20. Then we can subtract 2 and get 18 and so on. The minimum number of steps to get from 25 to 0 is shown below: 25→20→18→10→9→0. Now you need to write a DP program to find the minimum number of steps to solve the problem for any input. Input range will be from 0 to 999. [Python Implementation]arrow_forwardWe usually write numbers in decimal form (or base 10), meaning numbers are composed using 10 different “digits" {0, 1,...,9}. Sometimes though it is useful to write numbers hexadecimal or base 16. Now there are 16 distinct digits that can be used to form numbers: {0, 1, ...,9, A, B, C, D, E, F}. So for example, a 3 digit hexadecimal number might be 2B8. a. How many 4-digit hexadecimals are there in which the first digit is E or F? 8192 b. How many 5-digit hexadecimals start with a letter (A-F) and end with a numeral (0-9)? c. How many 3-digit hexadecimals start with a letter (A-F) or end with a numeral (0-9) (or both)?arrow_forwardBelow is the signal x (t). even {x (t)} and odd {x (t)} signal parts of this signaldraw and drawarrow_forwardCorrect answer will be upvoted else downvoted. Computer science. You are given an integer n. Check if n has an odd divisor, more noteworthy than one (does there exist such a number x (x>1) that n is separable by x and x is odd). For instance, assuming n=6, there is x=3. Assuming n=4, such a number doesn't exist. Input The primary line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow. Each experiment contains one integer n (2≤n≤1014). If it's not too much trouble, note, that the input for some experiments will not squeeze into 32-cycle integer type, so you should use no less than 64-digit integer type in your programming language. Output For each experiment, output on a different line: "Indeed" if n has an odd divisor, more noteworthy than one; "NO" in any case. You can output "YES" and "NO" regardless (for instance, the strings yEs, indeed, Yes and YES will be perceived as certain).arrow_forwardWrite a code for MatLab that is capable of solving 3x3 magic squares. Magic squares are those in which the sum of all the numbers in a row, column or diagonal is a specific number. - For example, the following is a magic square to solve, where the sum is required to be equal to 111 (See image)arrow_forwardComputer sciencearrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr