JkSoftware

Day 8 - Exercise Paint Coverage Calc

Nov 11th, 2021 (edited)
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. import math
  2. #Write your code below this line
  3.  
  4. def paint_calc(height, width, cover):
  5.     print()
  6.     num_ = ((height * width) / cover)
  7.     num_ = math.ceil(num_)
  8.     print(f"{num_} cans of paint needed")
  9.  
  10.  
  11.  
  12.  
  13.  
  14. #Write your code above this line
  15. # Define a function called paint_calc() so that the code below works.  
  16.  
  17. #  Don't change the code below
  18. test_h = int(input("Height of wall: "))
  19. test_w = int(input("Width of wall: "))
  20. coverage = 5
  21. paint_calc(height=test_h, width=test_w, cover=coverage)
  22.  
  23.  
Add Comment
Please, Sign In to add comment