Write a program in python to input the length and width of a rectangular garden in metre.
The output of the program should be the cost of fencing the garden at the rate of Rs. 50 per metre and the cost of levelling the garden at the rate of Rs. 10 per square metre.
Answers
Answered by
0
Answer:
length = int(input("Enter lenght of the garden"))
breadth = int(input("Enter breath of the garden"))
Perimetre = 2 x length x breadth
cost_fencing = 50 × Perimetre
Area = length x breadth
cost_levelling = 10 x Area
print(f"Cost of fencing this rectangular garden is rupees{cost_fencing}")
print(f"Cost of leveling this rectangular garden is rupees {cost_levelling}")
# or you can also do it like this
#print(f"Cost of fencing this rectangular garden is rupees {cost_fencing} and cost of levelling this rectangular garden is rupees {cost_levelling }")
I hope it will help you.
Similar questions