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
# 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)
Comments
Leave a comment