Answer to Question #160152 in Python for Nishitha

Question #160152

The garments company apparel wishes to open outlets at various locations .the comapny short listed several plots in these locations and wishes to select only plots that are square shaped .

Write an algorithm to help apparel to find number of plots that it can select for its outlets


1
Expert's answer
2021-01-31T09:02:57-0500
# getting the number of the plots
n = int(input("Enter the number of the plots: "))


# initial number of the square plots
num = 0


# getting length and width of the plots
for i in range(n):
	length = int(input("Enter the length : "))
	width =  int(input("Enter the width : "))


	if length == width:
		num = num + 1
		
# printing total number of the square plots
print("Total number of the square plots: ",num)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS