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
The true or false questions.
tankabanditka [31]

Answer:

false

Explanation:

-exec option is not mandatory for the find command.

find will still list out the identified files even in the absence of -exec option.

For example:

find . -name test -print

will print out files with the name 'test' in the current directory. Note that there is no exec option in this example.

Same holds true for find with no additional options at all.

For example:

find .

will list out all files in the current directory.

3 0
3 years ago
4
kupik [55]

Answer:

the answer is D Smart Object

5 0
3 years ago
Read 2 more answers
What would be the most popular piece of technology on Earth?
spin [16.1K]

Answer:

the smart phone

Explanation:

It is the most widley used and accepted

8 0
3 years ago
Read 2 more answers
Which statement accurately compares the restart at 1 and continue numbering featured of word
Andrews [41]

Answer: the continue numbering feature can be used to maintain the numbering order in a list and the restart at 1 feature can be used to make a new list

Explanation:

7 0
3 years ago
Read 2 more answers
Students with "Red" hair had the highest average number of free throws made on the "Hair Color Summary" table and students with
erik [133]
Babe he is is dis d did d did. D
4 0
3 years ago
Other questions:
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • which of these paste options is commonly available from the paste options button? A> use the destination them. B. keep the em
    14·2 answers
  • How did tafts accomplishments regarding conservation and trust-busting compare to roosevelt?
    11·1 answer
  • The show ip dhcp binding command displays _____. (Points : 5) the MAC table cache information
    7·1 answer
  • How to learning algothrim bett
    5·1 answer
  • Which of the following is the best example of an installation issue?
    6·2 answers
  • Which of the following methodologies might be most appropriate if you have a system project with:unclear user requirements; unfa
    12·1 answer
  • The goal of a system is to
    6·1 answer
  • You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
    9·2 answers
  • Where are all my smart ppl at? Help me out!!!
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!