Skip to content

Commit a98784d

Browse files
committed
flod paper
1 parent 0aafaec commit a98784d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

newcodes/answers/q56.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python
2+
# coding=utf-8
3+
4+
def flod_paper(n, d):
5+
h = d*2**n
6+
return h
7+
8+
if __name__ == "__main__":
9+
d = 1/200
10+
n = 30
11+
h = flod_paper(n, d)
12+
h_meter = h / 100
13+
print('After {0} floding, its high is {1}m.'.format(n, h_meter))

0 commit comments

Comments
 (0)