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
What type of malicious software masquerades as legitimate software to entice the user to run it?
Vlada [557]

Answer:

Trojan horse

Explanation:

A Trojan horse is malicious software that masquerades as a legitimate computer program such as a video game, image file, utility program, or even an antivirus so as to entice the user to run it, thereby allowing an attackers (the developer of the malicious program) to gain access to the data on the computer in an illegal manner.

4 0
3 years ago
Within a single program, __________________ allows multiple parts, or threads, to run simultaneously.
jekas [21]
<span>It should be single-user/multitasking os.</span>
4 0
4 years ago
Charles Montesquieu believed that the
kakasveta [241]

Answer:

A. Make Laws

Explanation:

Montesquieu believed the ways to go about limiting the power of a monarch would be to split up power among 3 groups, Judicial, Legislative and Executive. The American Presidential system and Constitution used Montesquieu's writings as a foundation for their principles.

  1. Judicial Interprets laws
  2. Legislative Makes laws
  3. Executive Enforces Law

6 0
3 years ago
Read 2 more answers
A(n) _____ allows individuals to create and publish a profile, create a list of other users with whom they share a connection (o
Mice21 [21]

Answer:

Social Networks

Explanation:

Social Network provides a way for users to create a profile, create a list of other users whom they share a connection with. This allows users to connect with other users who share similar interests with them. Businesses can also leverage the power of the social network to boost their sales and gain more reach and visibility.

4 0
3 years ago
What is the definition of phishing with an example
Diano4ka-milaya [45]
Phishing is an ability of fraudulently obtaining personal info.
synonyms: Fraud and scam
8 0
3 years ago
Other questions:
  • The basic components of cartridges and shotshells are similar. Shot pellets and a bullet are examples of which basic component?
    13·1 answer
  • How to add bullet points in google slides??
    12·2 answers
  • You have been found at fault in a crash where someone was injured and was transported to a medical treatment facility. By law yo
    15·2 answers
  • Write a statement to add the key Tesla with value USA to car_makers. Modify the car maker of Fiat to Italy. Sample output for th
    9·1 answer
  • Al these are benefits of computer literacy except
    14·1 answer
  • Visual Design includes 4 elements: shapes, texture, lines and form.
    6·1 answer
  • What solicits online input such as product ratings from consumers?
    7·1 answer
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
  • What would a good digital citizen do if he sees his classmate left her email account open on a school computer by mistake?
    11·1 answer
  • What are some industries of aerodynamics and hydrodynamics? explain each one in detail.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!