Menu Close

Calculate the total cost of painting the property

We want to estimate the cost of the painting a property.
Interior wall painting cost is Rs.18 per square feet and exterior wall painting cost is Rs.12 per square feet.
Take input as
1.Number of interior walls
2.Number of exterior walls
3.Surface area of each interior wall in units of square feet
4.Surface area of each exterior wall in units of square feet

Calculate and display the total cost of painting the property.


sum1=0
sum2=0
Int=int(input("No: of interior walls: "))

for i in range(Int):
	d=float(input("Surface Area {}: ".format(i+1)))
	sum1+=d
print("\n")
Ext=int(input("No: of exterior walls: "))

for j in range(Ext):
	d=float(input("Surface Area {}: ".format(j+1)))
	sum2+=d
print('\n')
total=((sum1*18)+(sum2*12))
print("Total Estimated Cost: {} INR".format(total))

Input:
No: of interior walls: 6
Surface Area 1: 12.3
Surface Area 2: 15.2
Surface Area 3: 12.3
Surface Area 4: 15.2
Surface Area 5: 12.3
Surface Area 6: 15.2

No: of exterior walls: 3
Surface Area 1: 10.10
Surface Area 2: 10.10
Surface Area 3: 10.00

Output:
Total Estimated Cost: 1847.4 INR


Exec. on linux

Morae!Q!