paint-calc.py 545 B

1234567891011121314151617181920212223
  1. #Write your code below this line 👇
  2. import math
  3. def paint_calc(height, width, cover):
  4. number_of_cans = height * width / cover
  5. number_of_cans = math.ceil(number_of_cans)
  6. print(f"You'll need {number_of_cans} cans of paint.")
  7. #Write your code above this line 👆
  8. # Define a function called paint_calc() so that the code below works.
  9. # 🚨 Don't change the code below 👇
  10. test_h = int(input("Height of wall: "))
  11. test_w = int(input("Width of wall: "))
  12. coverage = 5
  13. paint_calc(height=test_h, width=test_w, cover=coverage)