Skip to content

Commit 9f867a8

Browse files
authoredNov 22, 2024··
Merge pull request #744 from kaeruishere/patch-3
Create pyramid_umut_eren_kaplan.py
2 parents 1e3aa32 + 0dbcb98 commit 9f867a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎Week03/pyramid_umut_eren_kaplan.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def calculate_pyramid_height(number_of_blocks):
2+
height = 0
3+
usedblocks = 0
4+
5+
while usedblocks < number_of_blocks:
6+
usedblocks +=1
7+
height+=1
8+
number_of_blocks -=height
9+
10+
return height

0 commit comments

Comments
 (0)
Please sign in to comment.