subject
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.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
The temperature of air decreases as it is compressed by an adiabatic compressor. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:10
You are making beer. the first step is filling the glass carboy with the liquid wort. the internal diameter of the carboy is 15 in., and you wish to fill it up to a depth of 2 ft. if your wort is drawn from the kettle using a siphon process that flows at 3 gpm, how long will it take to fill?
Answers: 1
You know the right answer?
Using Python, create a program that adds the numbers 1/2 to itself and 1/3 to itself a large number...
Questions
question
Mathematics, 09.12.2020 20:30
question
Mathematics, 09.12.2020 20:30
question
English, 09.12.2020 20:30
question
Mathematics, 09.12.2020 20:30
question
Mathematics, 09.12.2020 20:30
question
Mathematics, 09.12.2020 20:30
Questions on the website: 13722361