Advertisement
simeonshopov

Gift Box Coverage

Jan 23rd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. side_size =  float(input())
  2. sheets = int(input())
  3. sheet_cover = float(input())
  4. covered = 0
  5.  
  6. box_size = 6 * side_size ** 2
  7.  
  8. for sheet in range(1, sheets + 1):
  9.     if sheet % 3 == 0:
  10.         covered += sheet_cover * 0.25
  11.     else:
  12.         covered += sheet_cover
  13.  
  14. print(f'You can cover {((covered / box_size) * 100):.2f}% of the box.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement