Engineering
Engineering, 21.02.2020 17:27, Animallover100

Using Python, create a program that adds the numbers 1/2 to itself and 1/3 to itself a large number of times. It is to then compare the values of adding the numbers to multiplying 1/2 and 1/3 times the number of times they were added. The program must first do the 1/2 and 1/3 adds, and then compare the sums to the value obtain using multiplication instead of addition. It is to do this for the following values: 1,000 10,000 100,000 1,000,000 10,000,000 100,000,000 1,000,000,000 The program should do this using two nested loops. The outer loop determines the number of times to add and starts at a 1000 and increments by multiples of 10 up to a 1,000,000,000. The inner loop does the addition of the numbers 1/2 and 1/3. When the inner loop completes, output the two sums (the ½ and the 1/3) and the two products, and the differences and continue the outer loop. Remember to clear your variables for the sums (accumulators) before the start of the inner loop.

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:20, luisgonz5050
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
image
Engineering, 04.07.2019 18:20, cxttiemsp021
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 °c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
image
Engineering, 04.07.2019 19:10, ultimateapes
When subject to a steady load (within elastic range) over a long period of time, what is the major difference in material behavoir between steel and plastic?
Answers: 2
image
Engineering, 04.07.2019 19:20, carterdaw
Aseries piping system conveys methyl alcohol. the system consists of 70 m of 1- nominal pipe follow by 50 m of 2-nominal pipe, both schedule 40 commercial steel. the 1-nominal pipe contains 3 90° elbows (regular) anda fully open gate valve, all threaded. the pressure drop through the system is 150 kpa. determine the volume flow rate through the system that is horizontally laid.
Answers: 1
Do you know the correct answer?
Using Python, create a program that adds the numbers 1/2 to itself and 1/3 to itself a large number...

Questions in other subjects:

Konu
Mathematics, 27.10.2020 18:50
Konu
World Languages, 27.10.2020 18:50
Konu
Mathematics, 27.10.2020 18:50
Konu
English, 27.10.2020 18:50