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]
2 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]2 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
What is the use of consonant in QBASIC ? Answer me in short and easy answer.​
Digiron [165]

Answer:

See Explanation

Explanation:

I'll assume the question is about the use of constants in QBasic because consonants do not have any special function or usage in QBasic.

In simple terms: In QBasic, constants are used to represent elements that do not change in value during program execution.

Take for instance, you intend to use \pi in your program.

Its value is \pi = 3.142

So, 3.142 will always be a constant in your program. One of the ways it can be used in a program is:

10 LET PI = 3.142

<em>The above represents a numeric constant. QBasic also have string constants.</em>

3 0
3 years ago
. Why use a sensitivity analysis?
Natali [406]

Answer:

 Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.  

The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.

It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.

7 0
3 years ago
Which of the following is NOT true of constructors? Question 6 options
LenKa [72]

Answer:

All are True

Explanation:

a. A constructor must have the same name as that of a class. For example

public class MyFirstClass{  // this is the class name

  public MyFirstClass() } // the constructor having the same name as class.

b. Constructors never have a return type not even void because it is only used to initialize the values of data members of the class when the object of the class is created so constructors are not directly called hence they do not need to have a return type.

c. Constructors are invoked using the new operator.

When the new object is created the constructor is invoked in order to initialize the variables of a class. The memory is allocated to the object and then the constructive is invoked for the purpose to initialize the object.

7 0
3 years ago
A computer has a pipeline with four stages. each stage takes the same time to do its work, namely, 1 nsec. how many instructions
prisoha [69]

In figuring, a pipeline, otherwise called an information pipeline, is a lot of information preparing components associated in arrangement

Further explanation:

In figuring, a pipeline, otherwise called an information pipeline, is a lot of information preparing components associated in arrangement, where the yield of one component is the contribution of the following one. The components of a pipeline are frequently executed in parallel or in time-cut style.

Instruction travelling:

999,999,997 guidelines for each second. The pipeline has 3 nsec of straightforward figurings, at that point finishes a guidance in each ensuing nsec.  

3nsec (for first guidance to go down the pipeline).10^9 ns every second. 10^9 – 3 = 999999997 directions.

Instruction per second:

MIPS - Million guidelines for each second  

Million guidelines for each second (MIPS) is a more established, outdated proportion of a PC's speed and power, MIPS measures generally the quantity of machine directions that a PC can execute in one second.

Per second:

Million directions for each second (MIPS) is a more established, old proportion of a PC's speed and power, MIPS measures generally the quantity of machine guidelines that a PC can execute in one second. Be that as it may, various directions require pretty much time than others, and there is no standard strategy for estimating MIPS. Moreover, MIPS alludes just to the CPU speed, while genuine applications are commonly constrained by different elements, for example, I/O speed

Answer Details:

Subject: Computer and technology

Level: College.

Key Words:

Further explanation:

Per second:

Instruction per second:

Instruction travelling:

For further Evaluation:

brainly.com/question/6362387

brainly.com/question/12938965

6 0
3 years ago
Read 2 more answers
SHOW ME SOME C++ TUTORIALS?
german
Google c++ tutorial. Cplusplus and Tutorials Point both have some good resources
4 0
3 years ago
Other questions:
  • A(n) ____ is a user interface that allows users to interact with graphical objects and pointing devices.
    13·1 answer
  • So when i try to click on an assignment to answer it the ask a question thing pops up and i can't exit out of it. I've tried rel
    10·2 answers
  • Design a hierarchy c hart or flowchart for a program that calculates the current balance in a savin gs account. The program must
    8·1 answer
  • In the writing and language test of the SAT, questions ask students to do which of the following? A. Write an essay B. Define a
    14·2 answers
  • Write a program in c++ that plays a number guessing game with a Human user. The Human user will think of a number between 1 and
    7·2 answers
  • Problem 1: you must write a method for this problem called sentenceAnalyzer Write a program that reads a sentence from the keybo
    10·1 answer
  • Jiz<br>Active<br>2<br>3<br>- 2(7 - 15)<br>What is the value of<br>4​
    10·2 answers
  • Why Use LinkedIn AI Automation Tools to Grow Your Sales Pipeline?
    7·1 answer
  • You can merge the cells using the rowspan and colspan attribute of the tag <br> true or false​
    7·1 answer
  • Why header files are needed in every c program ?expalin​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!