Pls help to solve | SoloLearn: Learn to code for FREE!

0

Pls help to solve

Exponentiation is the raising of one number to the power of another. This operation is performed using two asterisks **. Let's use exponentiation to solve a known problem. You are offered a choice of either $1.000.000 or $0.01 (one penny) doubled every day for 30 days (the resulting amount is doubled every day). Task: Write a program to calculate the amount that will result from the doubling to understand which choice results in a larger amount. Hint: Let's see how exponentiation can be useful to perform the calculation. For example, if we want to calculate how much money we will have on the 5th day, we can use this expression: 0.01*(2**5) = 0.32 dollars (multiply the penny by 2 raised to the power of 5).

1/21/2021 1:56:34 PM

Akash Kumar Yadav

17 Answers

New Answer

+10

show ur attempt first

+5

In this problem SoloLearn gave the hints so clearly that the answer became very obvious. The code is very simple. print(0.01*(2**30)) The code which you wrote has quotation marks in it that is the reason why your code isn't working. Happy Coding

+1

help to solve Write a program to take a string as input and output its reverse. The given code takes a string as input and converts it into a char array, which contains letters of the string as its elements. Sample Input: hello there Sample Output: ereht olleh

+1

# here to solve your problem we first assign a variable float to calculate amount that results from doubling so and then simply use this below code. float=0.01*(2**30) print (float)

+1

Nti Anthony post it as a new question and give a link here...I will surely answer

0

Akash Yadav https://www.sololearn.com/coach/115?ref=app try this program for this question

0

The Statement, (0.01*(2**30)) store it in a Variable. Where, 0.01 is One Penny. 2 means Double the Penny, and 30 means for 30 Days (1Month). That Simple Statement gives you the Amount of Money that you would have after 30 Days. This is One Amount. And, $1000000, s the Other Amount. Just Compare these Two Amounts, and check which is more Amount. Now, lets get to Work. 😇 You wouldn't like to get the Smaller Amount of Money, Do you?

0

Hi, who wants to be my friend

0

-1

-1

# your code goes here print ("0.01*(2**5) = 0.32") print ("0.01*(2**5) = 0.64") print ("0.01*(2**5) = 1.28") print ("0.01*(2**5) = 2.56") print ("0.01*(2**5) = 5.12") print ("0.01*(2**5) = 10.24") print ("0.01*(2**5) = 20.48") print ("0.01*(2**5) = 40.96") print ("0.01*(2**5) = 81.92") print ("0.01*(2**5) = 163.84") print ("0.01*(2**5) = 327.68") print ("0.01*(2**5) = 655.36") print ("0.01*(2**5) = 1310.72") print ("0.01*(2**5) = 2621.44") print ("0.01*(2**5) = 5248.88") print ("0.01*(2**5) = 104185.76") print ("0.01*(2**5) = 20971.52") print ("0.01*(2**5) = 41943.04") print ("0.01*(2**5) = 83886.08") print ("0.01*(2**5) = 167772.16") print ("0.01*(2**5) = 335544.32") print ("0.01*(2**5) = 671088.64") print ("0.01*(2**5) = 1342177.28") print ("0.01*(2**5) = 2684354.56") print ("0.01*(2**5) = 5368709.12") print ("0.01*(2**5) = 10737418.24")

-1

In my code

-1

Yes i am completely new

-2

Can't understand

-3

What I wrote what changes should I have to make

-3

For the $1.000.000 dollars Dollars=1000000*(2**30) #For the 0.01 kobo Kobo=0.01*(2**30) print(Kobo) ☝☝is a solution

-3