subject
Engineering, 08.11.2019 22:31 holytreesaroy

The sum of squares of n is n2 + (n-1)2 + (n-2)2 + + 12 for n> =1.write code that uses a for loop (not a while or do loop) that starts the loop counter i at n, and reduces i by 1, as long as i is > = 1, and inside the loop we accumulate i2. after the loop is done, return the accumulated value. now place this code inside a function named squaresof, which takes one parameter n as integer, and returns an integer. declare all other needed variables. note that you must write the function definition and name and use the variables (and their names) above exactly as noted. you may add other variables as needed. do not add any other code here.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
You know the right answer?
The sum of squares of n is n2 + (n-1)2 + (n-2)2 + + 12 for n> =1.write code that uses a for loop...
Questions
question
Mathematics, 13.01.2020 19:31
question
History, 13.01.2020 19:31
question
Mathematics, 13.01.2020 19:31
Questions on the website: 13722359