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 using python
#****************main.py***************#
import math;
def paper_thickness(value):
paperThickness = (1/200)*math.pow(2,int(value));
return paperThickness;
val = input("Enter the number of folding: ")
print("The paper thickness is ",paper_thickness(val),"cm")

Please let me know if you have any doubt or modify the answer, Thanks :)
Take one sheet out of your newspaper, and fold it in half, then fold it in...
Q1) A simple random generator is obtained by the formula rnew = (a×rold+b)%m and then setting rold to rnew. Write a program that asks the user to enter an initial value for rold. (Such a value is often called a seed). Then print the first 100 random integers generated by this formula, using a = 32310901, b = 1729, and m = 224 . Q2) How thick does paper folding get? Take one sheet out of your newspaper, and fold...
Instructions: Complete the assignment on a separate sheet of paper. Be su project. Your write-up should be no longer than a page and a half To construct the fractal known as the dragon, we w need a long strip of paper and a few definitions. A valley fold (V) on a piece of paper is a crease where the paper has been folded up towards itself (see Figure la) while a mountain fold (M) on a piece of paper is...
The Box Problem Take an 8% x 11 sheet of paper and cut out 4 congruent squares (one from each corner) as shown below on the left. This creates a net for an open-topped box (rectangular prism) which can be folded up as shown on the right. We're going to use our box to carry as many M & M's as possible. If the side-length of each cut-out square is 1 inch, then the box created will have dimensions 1...
The Depth Gauge Problem Liquids are often stored in elliptical storage tanks as shown below. To measure the volume of liquid in the tank, a depth gauge (measuring stick) can be used. It is inserted into an opening at the top and the level of liquid on the gauge can be used to determine the amount of liquid in the tank. The tank has width w, height h and length len (all in meters). In the example output shown below,...
Write a C++ program to solve:
The completed program should include the following:
—Program input and output
—Allow the user to input the starting, stopping and increment
values for the insulation thickness and the air temperature. Also,
at the end of the program, provide an opportunity for the user to
use the program again without having to re-execute the program (ie.
Ask them if they want to use the program again).
—your program must find and output the value of...
Create one program using these three programs: 1. Payroll Calculator Need to include state tax amount and SS amount Net pay need to reflect those amount Need to make all the amounts with 2 decimal points. Hint See line #31 - Use the programming outline/format discussed in the lecture, with proper documentation, data declaration, etc. - When asking a user for data, provide user-friendly and clear direction - Same thing for the output. - Include code and screenshot of the...
18.1 Lab Lesson 11 (Part 1 of 1) Part of lab lesson 11 There in one part to lab lesson 11. The entire lab will be worth 100 points. Lab lesson 11 part 1 is worth 100 points For part 1 you will have 80 points if you enter the program and successfully run the program tests. An additional 20 points will be based on the style and formatting of your C++ code. Style points The 20 points for coding...
Please answere using python language codes. Write a program to print out Collatz sequence for a user-supplied number. Prompt the user for a positive integer which will become the first number in the sequence. Next number in the sequence is derived as follows: If previous number is odd, the next number is 3 times the previous, plus 1. If previous number is even, the next number is half of the previous According to Collatz proposition, the sequence ultimately reaches 1...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
Please solve in python and provide comments explaining your
codes. Your output must be the same as the example and result given
below in the images.
This task is to write a very basic text editor. It allows you to
add, delete and modify lines of text. Use a list of
strings to store the lines, with each list element being one line.
The elements of the list are modified according the commands given
by the user.
The editor repeatedly:
1. displays...