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
Vladimir [108]
3 years ago
6

Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a

ssociates that value with total. Thus your code should associate 11 22 33 ... 4949 50*50 with total. Use no variables other than k and total.
Computers and Technology
1 answer:
Tems11 [23]3 years ago
3 0

Answer:

total = 0

k = 1

while k <= 50:

total += k**2

k += 1

print(total)

Explanation:

Note: There some errors in the question. The correct complete question is therefore provided before answering the question as follows:

Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 with total. Use no variables other than k and total.

The answer is now explained as follows:

# Initialize k which is the number of term

k = 1

# Initialize total which is the sum of squares

total = 0

# Loop as long as k is less than or equal to 50.

while (k <= 50):

# Add the square of k to total in order to increase it

total = total + k * k

# Increase the value of k by one.

k += 1

# Finally, output total

print (total)

You might be interested in
90 points can someone please write the code for this (HTML):
frez [133]

Answer:

Explanation:

1.

First name:

Last name:

.

2.

What fraction of a day is 6 hours?

Choose 1 answer

6/24

6

1/3

1/6

Submit

</p><p> // The function evaluates the answer and displays result</p><p> function displayAnswer1() {</p><p> if (document.getElementById('option-11').checked) {</p><p> document.getElementById('block-11').style.border = '3px solid limegreen'</p><p> document.getElementById('result-11').style.color = 'limegreen'</p><p> document.getElementById('result-11').innerHTML = 'Correct!'</p><p> }</p><p> if (document.getElementById('option-12').checked) {</p><p> document.getElementById('block-12').style.border = '3px solid red'</p><p> document.getElementById('result-12').style.color = 'red'</p><p> document.getElementById('result-12').innerHTML = 'Incorrect!'</p><p> showCorrectAnswer1()</p><p> }</p><p> if (document.getElementById('option-13').checked) {</p><p> document.getElementById('block-13').style.border = '3px solid red'</p><p> document.getElementById('result-13').style.color = 'red'</p><p> document.getElementById('result-13').innerHTML = 'Incorrect!'</p><p> showCorrectAnswer1()</p><p> }</p><p> if (document.getElementById('option-14').checked) {</p><p> document.getElementById('block-14').style.border = '3px solid red'</p><p> document.getElementById('result-14').style.color = 'red'</p><p> document.getElementById('result-14').innerHTML = 'Incorrect!'</p><p> showCorrectAnswer1()</p><p> }</p><p> }</p><p> // the functon displays the link to the correct answer</p><p> function showCorrectAnswer1() {</p><p> let showAnswer1 = document.createElement('p')</p><p> showAnswer1.innerHTML = 'Show Corrent Answer'</p><p> showAnswer1.style.position = 'relative'</p><p> showAnswer1.style.top = '-180px'</p><p> showAnswer1.style.fontSize = '1.75rem'</p><p> document.getElementById('showanswer1').appendChild(showAnswer1)</p><p> showAnswer1.addEventListener('click', () => {</p><p> document.getElementById('block-11').style.border = '3px solid limegreen'</p><p> document.getElementById('result-11').style.color = 'limegreen'</p><p> document.getElementById('result-11').innerHTML = 'Correct!'</p><p> document.getElementById('showanswer1').removeChild(showAnswer1)</p><p> })</p><p> }</p><p>

3.<p> rows="5" cols="30"</p><p> placeholder="type text.">

4. <p>I will display &euro;</p>

<p>I will display &part;</p>

<p>I will display &exist;</p>

5. <input type="submit">

6. This code should be the first code

<!-- This is a comment -->

<p>Start Test.</p>

<!-- Remember to add more information here -->

This code should be the last and at the end of the of the html code

<!-- This is a comment -->

<p>End Test.</p>

<!-- Remember to add more information here -->

Notice: Answers may not be accurate and may be accurate. And pls endeavor to edit any part of the html code.

4 0
3 years ago
Why do you think flowers are a popular topic for macro photography? Do you think you’d like to photograph flowers?
Helen [10]

Why do you think flowers are a popular topic for macro photography?

Macro photography is the part of photography that focuses on taking pictures of very small objects (or small parts of larger objects).  Popular subjects are insects, flowers and small mechanical parts.

Flowers are a very popular subject because they always have lots of interesting details no matter how close you zoom in, like insects.  Flowers however tend to be easier to photograph because they move a lot less than insects.

Do you think you’d like to photograph flowers?

Yes, because it's a new way to look at them.

6 0
3 years ago
one business rule is that each project has one manager. Identify two (and no more than two) problems with the data structure or
Vinil7 [7]

Answer:

1. The data will not be tallying up - there will great variations and deviance.

2. There will be not enough data points

Explanation:

The management style, though it uses one manager, is not devoid of problems in the system. For example, there will be great difficulty in the collection of accurate data to properly define the system. This presents a great misinformation on the outcome of the data process. This is likely to be caused by the first factor that is the data having a lot of discrepancies. The discrepancy causes the data to be meaningless in terms of the trends displayed. In addition, the lack of enough points posses a challenge to the data collection and processing procedure. The data base management system can be used to concentrate data on a central point of reference.

3 0
3 years ago
What is Geocortex and how does it work in web or mobile?
RoseWind [281]

Explanation:

Geocortex -

Geocortex mobile is the framework which is a native application for the different mobile OS such as iOS, Android, and Windows. It is built on the version of Esri’s ArcGIS Run time SDK for the .NET.

The Geocortex mobile Designer which is a browser-based configuration tool which is designed to simplify the experience combined with the Geocortex mobile, can make this the work leading framework and building the mobile offline apps on the Esri’s ArcGIS Run time .

The Geocortex mobile framework has many features which are building cutting-edge apps from the browser and optimizing the apps for mobile and also offline environments. We can also use the Geocortex Workflow for building the end-user interactions and also for any business process .

6 0
3 years ago
Let us begin
Darya [45]

Answer:

mhnnmm

Explanation:

okayyyyyyyyy:))

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the correct order of operations for protecting a critical section using a binary semaphore?
    15·1 answer
  • 5. Create a vector called to20 that goes from 1 to 20 (use the range notation). Now create a variable called end that goes from
    9·1 answer
  • In which of the following situations will a macro make your work more efficient?
    7·1 answer
  • Next
    12·1 answer
  • A computer is an electronic device, operating under the control of instructions stored in its own _______________, that can acce
    7·1 answer
  • The following are types of numbers except one. Select the one which is not an integer.
    11·1 answer
  • Cual es el procedimientos para asistir en el transporte publico a personas discapacitadas
    6·1 answer
  • Write a JavaScript program to create a multiplication table for numbers 1 to 12 using a while loop. I’ll mark brainliest, thanks
    9·1 answer
  • Part of the operating system core is responsible for controlling security, managing the file system, and providing a platform fo
    6·1 answer
  • onsider a file system on a disk that has both logical and physical block sizes of 512 bytes. assume that the information about e
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!