Skip to content

Commit 5e01573

Browse files
committed
paint_area.py
1 parent f64ea44 commit 5e01573

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

excercise_20.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def mul(*numbers):
2+
c=1
3+
for i in numbers:
4+
c=c*i
5+
print(f"Mul is {c}.")
6+
mul(2,3,-6,8)
7+
mul(2,5,8,9,0,6)

paint_area.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import math
2+
def paint_calculation(height,width,cover=7):
3+
area=height*width
4+
no_of_cans=math.ceil(area/cover)
5+
print(f"You will need {no_of_cans} cans of paint")
6+
h=int(input("Enter the height of wall in meter:\n"))
7+
w=int(input("Enter the width of wall in meters:\n"))
8+
coverage=7
9+
paint_calculation(width=w,height=h,cover=coverage)

0 commit comments

Comments
 (0)