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
weeeeeb [17]
3 years ago
12

Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and asso

ciate this value with total. Use no variables other than n, k, and total in python
Computers and Technology
1 answer:
dybincka [34]3 years ago
7 0

Answer:

The program in Python is as follows:

n = int(input("n:"))

total = 0

for k in range(1,n+1):

   total+=k**3

print(total)

Explanation:

This gets input for n

n = int(input("n:"))

This initializes total to 0

total = 0

This iterates from 1 to n

for k in range(1,n+1):

This adds up the cube of each digit

   total+=k**3

This prints the calculated total

print(total)

You might be interested in
A Python function cannot under normal circumstances reference a module variable for its value.
marishachu [46]
This is false because
6 0
3 years ago
Read 2 more answers
If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every pla
sergiy2304 [10]

If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

<h3>What is a cell reference in Excel?</h3>

A cell reference is known to be called a cell address and this is seen as a make up of a column letter and also those of  row number that tells a cell on a worksheet.

Hence, If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

Learn more about cell referencing from

brainly.com/question/19035038

#SPJ1

8 0
2 years ago
What are possible penalties if a designer is caught breaking copyright laws?
Dominik [7]

Answer:

1 and 4 are the correct answers.

Explanation:

3 0
3 years ago
In three to five sentences, describe how you would move a slide from the end of the presentation to the second slide.
hjlf
You just hold on the slide you want to move and move it to the second slide.
3 0
3 years ago
Which task is a part of the analysis phase of the SDLC
eduard
Following are the seven phases of the SDLC:Planning (1), Systems Analysis (2), Systems Design (3), Development (4), Testing (5), Implementation (6) and Maintenance (7)
8 0
3 years ago
Read 2 more answers
Other questions:
  • Informs the network interface card to pass packets sent to that address to the ip stack so their contents can be read, and tells
    9·1 answer
  • George is only familiar with VGA connector for monitors. What should you tell him are the main differences between VGA and DVI c
    8·1 answer
  • Which one of the following is not the name of a 20th century school composition
    14·2 answers
  • Help!!!! ASAP TIMED TEST 50 points!!!!
    7·1 answer
  • What is the type of person of personal computer which is also called a laptop computer?
    8·1 answer
  • 2) A simple operating system supports only a single directory but allows it to have arbitrarily many files with arbitrarily long
    7·1 answer
  • List safety conditions when downloading shareware, free free where, or public domain software
    14·1 answer
  • Mark and his team are working on a project that is due for delivery in the next few days. The team is using project management t
    10·1 answer
  • Does any of yall play rob lox?
    5·2 answers
  • 1. List three tabs that make up the Ribbon
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!