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
mart [117]
4 years ago
13

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 1*1 2*2 3*3 ... 49*49 50*50 with total. Use no variables other than k and total.
Computers and Technology
1 answer:
Vikentia [17]4 years ago
6 0

Answer:

total=0

def calcsumnumsquare(k,total):

   while k>=1:

       total+=int(k)*int(k)

       k-=1

   return total

print(calcsumnumsquare(4,0))

Explanation:

The program required is written above. It uses only two variables k and total as mentioned in the question. And the total is initially set to 9, and then its value is incremented by the square of each k during each loop established by while loop. And finally, when k=1, the output is returned. And we have printed the return value using print.

You might be interested in
When you power down a computer and turn off the rear computer case, the ______ is still on?
ladessa [460]
The battery is still on.
5 0
4 years ago
Read 2 more answers
I NEED HELP QUICK
Serjik [45]

Answer: keeps confidential documents secure,

displays a GUI, allocates the computer's resources, and retrieves files

Explanation:

The operating system can be defined as the software installed in the system that provides the information and services to the users by controlling the hardware, software resources, and regulates the computer programs. It runs the applications and programs in the system, displays the graphic user interface for the services, stores, manipulates, and retrieves files. It prevents the unauthorized access to the data and programs by using passwords thus provides the security to the system and documents.

8 0
3 years ago
A _____ saves your query and formats it in a professional-looking way.
Andrei [34K]

B. Report (APEX VERIFIED)

8 0
4 years ago
Read 2 more answers
How could a game development team use measures of things like blood pressure, brain waves, eye movement, and even electrical con
Sunny_sXe [5.5K]

Responses from the somatic nervous system, essentially via electromyogram. ( via adding responses through your body in order to add abstract or involuntary actions)

Responses from the autonomous nervous system that include blood pressure, heart rate, temperature and stomach pH, among others.

Response from the central nervous system obtained via electroencephalogram, which detects brain rates (alpha, theta, SM and MU waves).

4 0
2 years ago
Read 2 more answers
Mt. Everest, the highest mountain in the world, is located in Asia.<br><br> True<br> False
Roman55 [17]
True, it is located on the border of Nepal and Tibet.
8 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell all words correctly.
    14·1 answer
  • These statements describe the NOS.(choose all that applies)
    13·2 answers
  • Heelo how do u do python syntax lesson 11 on code academy
    12·1 answer
  • Consider a sequence of 1's and 1's with the property that the sum of any prefix of the sequence is never negative For example th
    5·1 answer
  • Convert (675.6)8 to hexadecimal. (use base 2 instead of base 10 as the intermediate base for conversion).
    15·1 answer
  • Why does atmospheric pressure does not effect on planes,jet planes and rocket?​
    9·1 answer
  • How is hashing used?
    6·1 answer
  • Is computing gcse easy or hard
    10·2 answers
  • I want to do is speed test to do i go to for my computer
    11·1 answer
  • Explain how you would set up a Demilitarized Zone on. You have 25 workstations and a server on your site. Explain what additiona
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!