# Please help with Python code. testing for: def pyramid_blocks_generator(seed): n = 300 ns = it.islice(scale_random(seed, 3,...

###### Question:

testing for:

def pyramid_blocks_generator(seed):
n = 300
ns = it.islice(scale_random(seed, 3, 10), n)
ms = it.islice(scale_random(seed + 1, 3, 10), n)
hs = it.islice(scale_random(seed + 2, 2, 15), n)
yield from zip(ns, ms, hs)

def pyramid_blocks (n, m, h): A solid pyramid structure (although here in the ancient Mesoamerican than the more famous ancient Egyptian style) is built from layers, each layer consisting of a rectangle of identical cubic blocks. The top layer of the pyramid consists of n rows and m columns of such blocks. The layer immediately below each layer contains one more row and one more column, all the way to the bottom layer of the pyramid. If the entire pyramid consists of h such layers, how many blocks does this pyramid contain in total? Here you can solve this problem in a straightforward fashion by simply looping through the h layers and adding up all the blocks along the way in each layer. However, if you happen to know some discrete math and combinatorics, you can come up with an analytical closed form formula for the result and compute the answers much faster that way. (There is an important general principle in this for you to later ponder on your own once you have done more of these problems.) n h Expected result 2 3 1 6 2 3 10 570 10 11 12 3212 100 100 100 2318350 10**6 10**6 10**6 2333331833333500000

#### Similar Solved Questions

##### Problem Nine A test for a certain disease was given to 1,000 subjects, 8% of whom...
Problem Nine A test for a certain disease was given to 1,000 subjects, 8% of whom were known to have the disease. For the subjects who had the disease, the test had a positive result for the disease in 90% of the subjects, was inconclusive for 7% and a negative result in 3% of the subjects. For subj...
##### APPLYING YOUR KNOWLEDGE: A group of Santa Fe College students is studying the effects of forest...
APPLYING YOUR KNOWLEDGE: A group of Santa Fe College students is studying the effects of forest canopy cover on understory plant growth in North Woods located across the street from SF College. Using what you learned in the lab about photosynthesis, design an experiment that measures the effect of c...
##### A + 2B-30 Experiment Number [A] (M) [B] (M) Initial Rate (M/s) 1 0.112 0.58 0.87...
A + 2B-30 Experiment Number [A] (M) [B] (M) Initial Rate (M/s) 1 0.112 0.58 0.87 2 0.112 1.16 1.74 3 0.560 0.58 21.75 The rate law for this reaction is rate ОА. k[A]2[B] O B. [P] Ock[A][B] OD [A]2 O E k[A]2[B]2...
##### 16. The patient has an order for oxytocin (Pitocin) to infuse at 15 mu/minute. Available is...
16. The patient has an order for oxytocin (Pitocin) to infuse at 15 mu/minute. Available is oxytocin 10 units/1000 mL 0.9% NaCl. At what rate will the nurse set the infusion? ___ mL/hr (If needed, round to the nearest whole number.) How do you set this up using dimensional analysis please?...
##### Categorize each phrase below as being relevant to ionic bonding, covalent bonding or metallic bonding. molecular...
Categorize each phrase below as being relevant to ionic bonding, covalent bonding or metallic bonding. molecular formula electron-sea model nonmetal with nonmetal electron sharing three-dimensional array separate molecules electron transfer metal with nonmetal electron pooling empirical formula allo...
##### An array antenna consists of two identical half-wave dipole antenna elements. The array operates in air...
An array antenna consists of two identical half-wave dipole antenna elements. The array operates in air at 100 MHz. User A is in the azimuth plane of the array, on a line that makes 60° with the line defined by the antenna elements. The driving current has no phase shift. What is the shortest ph...
##### Q21 In this phase of the business cycle, most businesses appear to be highly profitable. Trough...
Q21 In this phase of the business cycle, most businesses appear to be highly profitable. Trough Recession Recovery Boom...
##### Blasius equation for turbulent flow f = 0.316Red-1/4 holds good only when the Reynolds number is...
Blasius equation for turbulent flow f = 0.316Red-1/4 holds good only when the Reynolds number is in the range ____________....
##### In the circuit given below, R-90 . Find the value of Vab and io using mesh...
In the circuit given below, R-90 . Find the value of Vab and io using mesh analysis. 20 2 lo 30 2 80 V+ 20 2 0Vab 80 V + 30 2 The value of io in the circuit is 0.966 A. The value of Vab in the circuit is 28.98 V....
##### An eCommerce website displays the content slightly differently depending on the device used to access the website. Suppose the website manager knows that the proportion of customers who access the website using a smartphone is 0.62.
The website manager wants to collect a sample such that the standard deviation of the sample proportion is less than 0.02. What is the minimum sample size required to satisfy this criterion?Note:1- Round any intermediate numbers to 4 decimal places.2- Round your final answer ...
##### Two blocks are pushed along a frictionless surface. The static coefficient of friction between the blocks...
Two blocks are pushed along a frictionless surface. The static coefficient of friction between the blocks is .70 mm is the maximum force F that can be applied to the lower block (as shown on the diagram) Such that the upper block does not slide...
##### 2 methods of data collection for population health problem CLABSI
2 methods of data collection for population health problem CLABSI...
##### Business Law II Ch. 33- Agency Formation and Duties Professor Shane J. Egan Name Date 5....
Business Law II Ch. 33- Agency Formation and Duties Professor Shane J. Egan Name Date 5. An agency formed by making a written or oral agreement which clearly defines the scope of the relationship is known as an 6. ( True False) An agency formed by implication through the conduct of the parties is kn...
##### 25. What is the probability that a randomly chosen car purchase was a Hybrid purchased by...
25. What is the probability that a randomly chosen car purchase was a Hybrid purchased by a female given that an SUV was purcha: ? (Don't worry about decimal representation or reducing fractions.) a) 42/156 b) 42/240 c) 42/180 d) 47/180 e) None of the above VII. USE THE INFORMATION BELOW TO ANSW...
Prepare the summary entries necessary to determine the amount of cash received from customers for each of the four independent situations below.    Situation Sales revenue Accounts receivable Increase (Decrease) Cash received from customers 1 $280,000$ 10,800  &nb...