subject
Engineering, 06.11.2020 01:00 jprofaci29

At the beginning of the program, you ask the user how many numbers he or she wants to add. In the while-block, you prompt the user for the numbers to add. Here are the requirements:

Make the first statement the prompt to the user asking how many numbers to add. Assign that information to a variable called numbers_to_add.

Initialize the sum to 0.

Initialize the counter to 1.

Write a while-loop that runs while the counter is less than or equal to the number of numbers the user intends to enter.

In the while-block, prompt the user for the first number to add and assign it to a variable called number.

Add the number to the existing sum (which, the first time through, is 0).

Increment the counter by one.

Print out the sum ("The sum is ").

ansver
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 16:10, Arealbot
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
image
Engineering, 04.07.2019 18:10, ahmedeldyame
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
image
Engineering, 04.07.2019 18:10, 19deleonl
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
image
Engineering, 04.07.2019 18:10, niyawilliams23
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
You know the right answer?
At the beginning of the program, you ask the user how many numbers he or she wants to add. In the wh...

Questions in other subjects:

Konu
Mathematics, 02.12.2021 20:00
Konu
Biology, 02.12.2021 20:00
Konu
Social Studies, 02.12.2021 20:00
Konu
Computers and Technology, 02.12.2021 20:00