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 18:10
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
Aflywheel accelerates for 5 seconds at 2 rad/s2 from a speed of 20 rpm. determine the total number of revolutions of the flywheel during the period of its acceleration. a.5.65 b.8.43 c. 723 d.6.86
Answers: 2
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
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, 20.09.2020 03:01
question
Mathematics, 20.09.2020 03:01
question
History, 20.09.2020 03:01