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
AleksAgata [21]
4 years ago
13

Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first

50 counting numbers and store this value in total.
Computers and Technology
1 answer:
Flura [38]4 years ago
7 0

Answer:

Following are the statement is given below

Int total=0; // variable declaration

int k=1; // variable declaration

while(k<=50) // iterating the loop

{

total=total+k*k; // calculating sum of the squares

k++; // increment the value of k

}

Explanation:

Following are the description of the above statement

  • Declared a variable total and k of int type.
  • Initialized total to 0 and k to 1.
  • iterating the while loop up to the value 50.
  • In this while calculating the calculating sum of the squares in the total variable.
  • increment the value of k by 1. This loop is executed until 50.
You might be interested in
What happens when the ignition is turned to accessory
ss7ja [257]
<span>It switches on the electric power for many convenience components of the car like car stereo, power windows, power seats and cigarette lighter. It depends on the car, if this position also switches on energy thirsty components like headlights, rear window defroster and air ventilator. </span>
5 0
3 years ago
Read the following code: x = currentWeight print(x - 20) What value will this code calculate?
Serga [27]

D because weight print = x and -20 is the pound loss.

5 0
3 years ago
Given the string variable address, write an expression that returns the position of the first occurrence of the string "avenue"
MrMuchimi
String temp;

for i = 0 to Address.length - 6 do 
begin
     temp = copy(address, i, i + 6) //returns a substring of a string beginning at
                                                     //i and ending at i + 6 
     if temp = 'Avenue' then
          return i;
   
end;
8 0
4 years ago
Calculates the current that feeds a washer toy having a 10 ohm resistor and a battery operated with a potential difference of 30
andreev551 [17]

Explanation:

Using Ohm's Law and a bit of substitution, we can solve for current.

5 0
3 years ago
I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding
Oksana_A [137]

Answer:

Pseudocode:

import random

fetch user input on a lucky number

insert input into variable - "response"

new variable, random = randint

condition to check wheather random is our response

display results

Python Code:

import random

def main():

response = int(input("Guess my lucky number, its between 1 and 100: "))

lucky_number = random.randint(1,100)

if response == lucky_number:

print(f"Wow you're right, it is {lucky_number}")

else:

print("Sorry, Try Again")

main()

Reminder:

intended for python3 as i included the format f

also it could be done without the import, just manually insert a number

i'll leave the post mortum to you

Explanation:

3 0
3 years ago
Other questions:
  • The move up only one line in Microsoft Word, use the following method: (a) press Ctrl + Home Keys (b) Press Home Keys (c) Press
    10·1 answer
  • Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to bo
    10·1 answer
  • NEED HELP(10 POINTS) PLEASE HELP MATH
    8·2 answers
  • Authorization is a set of rights defined for a subject and an object. They are based on the subject’s identity.a. Trueb. False
    9·1 answer
  • An administrator wants to configure hosts to automatically assign IPv6 addresses to themselves by the use of Router Advertisemen
    14·1 answer
  • What is a collection of organized information that allows users to perform certain tasks such as searching for specific informat
    9·1 answer
  • if anyone could help me with this it would be great. I have to turn in a practice resume and im completely lost and have no clue
    7·1 answer
  • What ways does e-governance empower citizens
    15·1 answer
  • If an element is nested within another element, what happens to each line of the nested element?
    9·1 answer
  • Write a function that receives a one-dimensional array of integers and returns a Python tuple with two values - the minimum and
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!