I could use some help with this code. I don’t know how to break the cycle if the triangle does not work. Any ideas?

while True:

A=(int(input(‘Length of side A:’)))

B=(int(input(‘Length of side B:’)))

C=(int(input(‘Length of side C:’)))

```
while True:
if A<0 or B<0 or C<0:
print('Error, all sides must be positive')
if (A+B)<C or (B+C)<A or (A+C)<0:
print('Error, sides do not form a traingle')
answer=(str(input('Do you wish to try again(y/n)')))
if answer=='y':
continue
else:
break
if A==B and B==C:
print('It is an equilateral triangle')
if ((A**2)+(B**2)==(C**2)) or ((B**2)+(C**2)==(A**2)) or ((A**2)+(C**2)==(B**2)):
print('It is a right triangle')
if A==B or B==C or A==C:
print('it is an isosceles triangle')
if A!=B and B!=C:
print('It is a scalene triangle')
answer=(str(input('Do you wish to try again(y/n)')))
if answer=='y':
continue
else:
break
```