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
When Lisa purchased her house the mortgage lender required homeowners insurance to cover 100% of the loan amount. After many yea
Black_prince [1.1K]
I think that the  insurance coverage amount should be based on the appraisal value of the house. Appraisal value is an evaluation of the value of property based on a given point in time. This evaluation is done by an appraiser who is chosen by the lender.
3 0
3 years ago
Read 2 more answers
Where else can the computer send the results of processing other than to output​
hjlf

Explanation:

it can also be sent through flashdrive

3 0
2 years ago
You are manually configuring a tcp/ip host. another administrator gives you the router's ip address. what is the tcp/ip term for
Nuetrik [128]
Answer: Default Gateway address
5 0
3 years ago
Read 2 more answers
To save the changes to the layout of a table, click the Save button on the _____.
kari74 [83]
Quick access toolbar :)))))))))
7 0
3 years ago
The file containing the definitions of the member functions of class DateType is called the ______ file.
Free_Kalibri [48]

Answer:

Implementation file

Explanation:

In popular object oriented programming languages like C/C++, The implementation file (source file) of a class is used to hold the code implementaion of the method(s) of the class, this is helpful for seperating interface and method implementation. When this seperation exists, header files will be used to declare all the methods and fields of the class.

In this way, the implementaion file will hold the actual source code of the methods that are declared in the header file and will have a line to include its associated header file. A major advantage of seperating code in this way is the enhancement of better code organization and code re-use

6 0
3 years ago
Other questions:
  • Assume that an int variable age has been given a value. Assume further that the user has just been presented with the following
    14·1 answer
  • The numbers on the bottom of a typical check represent all of the following EXCEPT?
    12·2 answers
  • What is UNIX? A program for writing documents Graphical interface Internet browser Operating system
    8·2 answers
  • Mr. Green maintains a spreadsheet containing data on all of his employees, including name, job profile, monthly salary, and home
    15·1 answer
  • 50 POINTS!!!!
    8·1 answer
  • Choose a developing country and give 3 reasons why it is a developing country ​
    15·1 answer
  • Select the correct navigational path to mark all teachers who have achieved “excellent” on their evaluations a red background.
    11·2 answers
  • The moon has less mass than the earth, so what happens to objects on the moon?
    11·1 answer
  • How should you set the OHMS ADJust control on a multitester of analog VOM, for resistance measurements?
    12·1 answer
  • Which professionals can benefit from an understanding of statistics? Check all of the boxes that apply. magician trying to locat
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!