Question

In: Computer Science

Q2) How thick does paper folding get? Take one sheet out of your newspaper, and fold...

Q2) How thick does paper folding get? Take one sheet out of your newspaper, and fold it in half, then fold it in half again, and again, and again. Can you fold it 30 times? Pretending that you can (you probably can’t fold it more than 8 times), how thick would it be after 30 times? Assume the paper is 1/200 cm. thick. Write a program to solve this puzzle. Prompt for the number of folds and output the thickness in meters. Note : Run by pycharm

Solutions

Expert Solution

Thanks for the question.

Below is the code you will be needing  Let me know if you have any doubts or if you need anything to change.

Thank You !!

================================================================


folds = int(input('Enter the number of folds: '))

paper_thickness = 1 / 200

thickness = paper_thickness
for i in range(folds):
    # every time the thickness doubles the previous thickness
    thickness =  thickness*2
    print(i+1,'folds',thickness,'cm')  # you can comment this line

print('Thickness after {} folds is: {} meters'.format(folds, thickness/100))

==================================================================


Related Solutions

Take a piece of paper and fold it in half. Unfold it and there is one fold, which I'll signify with a "v". If you fold the paper twice
Use C#  RECURSION - PAPERFOLDS Concept Summary: 1. Recursion For this assignment1 you will design a recursive method and the main program that calls the recursive method. Description Take a piece of paper and fold it in half. Unfold it and there is one fold, which I'll signify with a "v". If you fold the paper twice (always keeping the folds in the same direction and the creases parallel), it will have three folds when you unfold it, and they...
How long does it take to deposit a coating of gold 1.00 um thick on a...
How long does it take to deposit a coating of gold 1.00 um thick on a disk-shaped medallion 4.00cm in diameter and 2.00mm thick at constant current of 86A? The density of gold 19.3 g/cm3 and the gold is from an Au(III) solution. (answer in seconds please!)
Choose one of these factors to explore. Your research paper should answer the two-fold question: Decreased...
Choose one of these factors to explore. Your research paper should answer the two-fold question: Decreased use of tobacco and drugs Regular physical activity Balanced nutritional intake Positive mental health Safe sexual activity Provision of preventative services Access to culturally appropriate health services Community participation in the planning and delivery of health services Participation in civic activities and social engagement Strong social networks Feeling of trust The feeling of power and control over life decisions Supportive family structure Positive self-esteem...
Grab a blank sheet of paper and try some GDP analysis on your own. Take a...
Grab a blank sheet of paper and try some GDP analysis on your own. Take a picture or scan your sheet, and upload it after you are finished. This contributes to your participation grade in the class. Because it is counted as investment, why doesn't the purchase of earthmoving equipment from China by a U.S. corporation increase U.S. GDP? Identify the immediate effect of each of the following events on U.S. GDP and its components: James receives a Social Security...
Grab a blank sheet of paper and try some GDP analysis on your own. Take a...
Grab a blank sheet of paper and try some GDP analysis on your own. Take a picture or scan your sheet, and upload it after you are finished. This contributes to your participation grade in the class. Because it is counted as investment, why doesn't the purchase of earthmoving equipment from China by a U.S. corporation increase U.S. GDP? Identify the immediate effect of each of the following events on U.S. GDP and its components: James receives a Social Security...
Grab a blank sheet of paper and try some inflation analysis on your own. Take a...
Grab a blank sheet of paper and try some inflation analysis on your own. Take a picture or scan your sheet, and upload it after you are finished. This contributes to your participation grade in the class. Because inflation increased by only 1.7% in 2008, the American Association of Retired Persons comments that this is “an unfortunate side effect of inflation, since Social Security payments, which are indexed to inflation, will increase by only 1.7% in 2008.” Comment on whether...
Grab a blank sheet of paper and try some inflation analysis on your own. Take a...
Grab a blank sheet of paper and try some inflation analysis on your own. Take a picture or scan your sheet, and upload it after you are finished. This contributes to your participation grade in the class. Because inflation increased by only 1.7% in 2008, the American Association of Retired Persons comments that this is “an unfortunate side effect of inflation, since Social Security payments, which are indexed to inflation, will increase by only 1.7% in 2008.” Comment on whether...
How does one get Alzheimers disease ?
How does one get Alzheimers disease ?
How long does it take electrons to get from the car battery to the starting motor?...
How long does it take electrons to get from the car battery to the starting motor? Assume the current is 149 A and the electrons travel through copper wire with cross sectional area 36.3 mm2 and length 82 cm . The mass density of copper is 8960 kg/m3 and the molar mass is 63.5 g/mol . Avogadro’s number is 6.022 × 1023 . Assume that each copper atom contributes one conduction electron. Answer in units of min.
Q1. what is the social contract theory? Q2. How does a society come out about as...
Q1. what is the social contract theory? Q2. How does a society come out about as a result of said theory? Q3. what do you ultimately believe is the origin of ethics? Is ethics an innate human trait that comes about while creating human societies? Or is it the result of of something else? Explain your reasoning.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT