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
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:20
Most leaks in reciprocating air compressors can be detected and minimized by: (clo4) a)-detecting leakage areas using ultrasonic acoustic detector. b)-tightening joints and connections c)-replacing faulty equipment d)-all of the given options
Answers: 2
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
question
Engineering, 04.07.2019 19:20
Apure substance is a)-mixture of various chemical elements or compounds b)-substance that has a fixed chemical composition throughout c)-mixture that is homogeneous (such as air) d)-all the answers
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, 25.03.2021 14:00
question
Spanish, 25.03.2021 14:00
question
Geography, 25.03.2021 14:00
Questions on the website: 13722362