Computer Science, asked by Rishikapadhy, 6 months ago

read the number of sides the polygon has the display which polygon it is. if the polygon has 3 sides it is triangle. i f the polygon has 4 sides it is quadrilateral. if the polygon has 5 sides it is a pentagon ( in python)

Answers

Answered by tanishq14052003
0

Answer:

while True:

n=int(input ("enter how many sides:v"))

if n==3:

print("the given polygon is a triangle")

elif n==4:

print("the given polygon is a quadrilateral")

elif n==5:

print("the given polygon is a Pentagon")

elif n==0:

break

else:

print("invalid input")

hope it may help

Similar questions