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!
- Insert and Extend in list
- Interchange first and last number in list
- Print Odd Numbers in range
- Compare List in python
- Find whether the largest element in the array is at least twice as much as every other number in the array.
- Find minimum cost to reach the top of the floor
- Word Count in Python
- Lower case to upper case in python
- Display Time in python
- Sum of Odd And Even in Python
- Surface Area of Walls
- Find the sum of squares of individual digits
- Print the given series – 1 1 2 6 24
- Minimum number of steps required to reach destination.
- Seconds to Days Hours Minutes
- Program to remove add “Hyphen” character in the entered string
- Remove the nth Index Character from a Non-Empty String
- Relational operator Question
- Check whether all the given numbers lies in range of x and y.
- Find the Armstrong numbers between the given range.