Write a program that calculates how many days it takes to accumulate at least $1,000,000 if someone deposits one penny on the first day, two pennies the second day, four pennies on the third day and continues to double each day. The output should display the number of days

Answers

Answer 1
Answer:

Answer:

Step-by-step explanation:

Let's do this in Python

day = 1

balance = 0

deposit = 0.01  # first deposit is 1 penny

while balance < 1000000: # execute the loop as long as balance is less than a million dollar

    balance += deposit

    deposit = deposit * 2 # double the deposit for the next time

    day += 1 # add one to day for the next day

print(day) # print out result once loop ends


Related Questions

Use the given information to write the equation of the line.slope 2, y-intercept - 4
Solve the equation for the variable b. a/b = c
How can you tell when a quadratic equation has no real solutions? . . A. when the radicand is negative. B. when b in the quadratic formula is greater than the radicand. C. when the radicand equals zero. D. when the radicand is not a perfect square
An angle measures 12° less than three times it’s supplement. Find the measure of the angle
Sam gave jen 1/2 of his jujubes .jen ate 1/2 ofthe jujubes and gave rest to kyle.kyle kept 8 of the jujubes and gave the last 10 to kim .how many jujubes did Jen eat?

Simplify -4 + (-3) + 6

Answers

Start off with: -4 + (-3) + 6

First of all, when there is a, + sign and a - sign next to each other, the - side wins.
E.g. 1 +- 3 = 1 - 3

So, apply this to our one:
-4 -3 +6

From there you solve, you can do this using the number line method or whatever you are into:
=-7 + 6
=-1
The answer is -1




Answer:. You would add the -3 + -4 together because they are the same type of member. So -4+-3=-7

-7 + 6 =-1

The answer would be-1

Step-by-step explanation:

By

Every square meter of solar paneling produces 0.2 kilowatts of electricity. Which of the following models this situation?

Answers

Somebody else posted this exact same question just yesterday.
HE didn't include the list of choices either.

Here are a couple of equations that model the situation:

               Power = 0.2 (length of side of a square solar panel)²
or
               Power = 0.2 (length of the solar panel) (width of the solar panel) .
Question choices:

linear function with a negative rate of changelinear function with a positive rate of changeexponential decay functionexponential growth function

He then unpacked 192 packs of frozen peas from 8 boxes.How many packs of frozen peas were in each box?

Answers

The question involves dividing the total number of packs (192) by the total number of boxes (8). The answer is 24 packs per box.

The subject of this question is Mathematics, and it's about the Division concept.

If a total of 192 packs of frozen peas were taken out from 8 boxes, we need to find out how many packs were in each box originally.

This can be done by dividing the total number of packs by the total number of boxes.

Therefore, you would do the calculation: 192 ÷ 8, which equals 24. So, there were 24 packs of frozen peas in each box.

Learn more about Division here:

brainly.com/question/2273245

#SPJ3

All we have to do is divide 192 by 8

192 ÷ 8 
(192)/(8) = 24

there were 24 packs of frozen peas in each box

Ron takes a ribbon thats 48inches long and cuts it in 2pcs, how long is each pcs, 1 pc is 3times as the other how long is each pcs.

Answers

48/4 because it is 3 times as long as the other piece thinking there are 4 pieces. So one piece has to be 12 because 48/4 is 12 and 12 x 3 is 36 so then we double check 12+36=48 so the pieces are 12inc and 36inc

X^2+5x-104=0 solve quadratic equations

Answers

x^2+5x-104=0\n\na=1;\ b=5;\ c=-104\n\n\Delta=b^2-4ac;\ if\ \Delta > 0\ then\ x_1=(-b-\sqrt\Delta)/(2a);\ x_2=(-b+\sqrt\Delta)/(2a)\n\n\Delta=5^2-4\cdot1\cdot(-104)=25+416=441;\ \sqrt\Delta=√(441)=21\n\nx_1=(-5-21)/(2\cdot1)=(-26)/(2)=-13;\ x_2=(-5+21)/(2\cdot1)=(16)/(2)=8\n\nAnswer:x=-13\ or\ x=8.
You first have to factor and get (x-8)(x+13)=o and set them equal to zero x-8=0 x=8 x+13=0 x=-13

Can someone help me please!! Thank you! One linear function, t(x), can be modeled by the values in the table below. A second linear function can be modeled by the equation 3x − 2y + 6 = 0. When comparing the x-intercepts of these lines, which function has the largest x-intercept and what is this value?


x t(x)
−2 −15
−1 −10
0 −5
1 0
2 5

A) t(x) has the largest x-intercept: 1.
B) 3x − 2y + 6 = 0 has the largest x-intercept: 3.
C) t(x) has the largest x-intercept: −5.
D) 3x − 2y + 6 = 0 has the largest x-intercept: −2.

Answers

C t(x)has the largest x-intercept:-5