1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
3241004551 [841]
3 years ago
8

Assume there is a variable, h already associated with a positive integer value. write the code necessary to compute the sum of t

he first h perfect squares, starting with 1. (a perfect square is an integer like 9, 16, 25, 36 that is equal to the square of another integer (in this case 3*3, 4*4, 5*5, 6*6 respectively).) associate the sum you compute with the variable q. for example, if h is 4, you would assign 30 to q because the first 4 perfect squares (starting with 1) are: 1, 4, 9, 16 and 30==1+4+9+16. submit
Mathematics
1 answer:
ludmilkaskok [199]3 years ago
8 0
Let q be the variable to be computed associated with h. the code is given below as  
q=0 / initial value assigned is 0 
for i in range(1,h+1): / for loop is formatted with range 1 t0 h+1 
q+=i**2 / sum q is computed as square of i
You might be interested in
F(x)=2x^2+1 using the derivate definition
morpeh [17]
\bf \stackrel{\textit{de} \textit{finition of a derivative as a limit}}{\lim\limits_{h\to 0}~\cfrac{f(x+h)-f(x)}{h}}\\\\
-------------------------------\\\\
f(x)=2x^2+1\implies \lim\limits_{h\to 0}~\cfrac{[2(x+h)^2+1]~~-~~[2x^2+1]}{h}
\\\\\\
\lim\limits_{h\to 0}~\cfrac{[2(x^2+2xh+h^2)+1]~~-~~[2x^2+1]}{h}
\\\\\\
\lim\limits_{h\to 0}~\cfrac{[2x^2+4xh+2h^2+1]~~-~~[2x^2+1]}{h}

\bf \lim\limits_{h\to 0}~\cfrac{\underline{2x^2}+4xh+2h^2\underline{+1}~~~~\underline{-2x^2-1}}{h}\implies \lim\limits_{h\to 0}~\cfrac{4xh+2h^2}{h}
\\\\\\
\lim\limits_{h\to 0}~\cfrac{2\underline{h}(2x+h)}{\underline{h}}\implies \lim\limits_{h\to 0}~2(2x+h)\implies \lim\limits_{h\to 0}~2(2x+0)\implies 4x
3 0
3 years ago
I do not under stand mad, what is the answer. A step by step solution will also help a lot
nydimaria [60]

Answer:

3

Step-by-step explanation:

start by finding the mean of the data set find the sum of the data values and divide the sum by the number of data values find the absolute value of the difference between each data value and the mean:)

3 0
3 years ago
A study conducted on American families shows that 18% of these families have medical bills of more than $10,000. Find the probab
Svetllana [295]

Answer:

the probability is 0.6293

Step-by-step explanation:

The computation of the probability is shown below:

Given that

n = 5

P = 0.18

As it represents the  binomial distribution

P(X = x) =  ^NC_x× p^x × (1 - p) ^(n - x)

P(X > 1) = 1 - P(X < 1)

= 1 - P(X = 0)

= 1 - ( ^5C_0× (0.18) ^0 × (0.82) ^5)

= 1 - 0.3707

= 0.6293

hence, the probability is 0.6293

3 0
3 years ago
Can some one pls help
pshichka [43]

Answer:

eggs = 6

3 more than eggs = 6+3 =9

5 0
3 years ago
Read 2 more answers
What is the midpoint of the segment shown below?
Nezavi [6.7K]

Answer:

(-9/2,3/2)

Step-by-step explanation:

x coordinate of mid point=(x1+x2)/2

y coordinate of mid point=(y1+y2)/2

4 0
3 years ago
Other questions:
  • Can someone answer this????????????????????????
    11·1 answer
  • Use multiplication to create an equivalent fraction for 6/9
    12·1 answer
  • Please please come help me please
    14·2 answers
  • Which expression could help you find the distance between (10,4) and (-6,4) ?
    8·1 answer
  • How many 2-letter combinations can be created from the distinct letters in the word "mathematician"? Assume that the
    12·1 answer
  • Help please, I have no idea how to do this and I have a test on it tmrw!
    10·2 answers
  • PLZ HELP VERY URGENT
    6·2 answers
  • Help!!!!!!!!!!!!!!!!!!!!!!!
    14·1 answer
  • Express the function graphed on the axes below as a piecewise funcntion
    6·1 answer
  • Which of the following is equal to the fraction below?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!