Created
September 23, 2021 07:50
-
-
Save Intey/5c5c93e5272026ced33b827e4b98dfb2 to your computer and use it in GitHub Desktop.
Досок в кубометре / цена за N досок
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def planks_in_cube(height, width, length): | |
return (1 * 1000 ** 3) / (height * width * length) | |
def price_for_planks(count, cube_price, height, width, length): | |
planks_count_in_cube = planks_in_cube(height, width, length) | |
one_plank_price = cube_price / planks_count_in_cube | |
return one_plank_price * count | |
# price_for_planks(3, 36000, 50, 200, 2000) | |
# > 2160 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment