0

Why does it show 'break outside loop' in the code

def DP(x,y,z): q = x/y w = q*z print(y,',',x) print(z,',',w) def IP(x,y,z): q = x*y w = q/z print(x,',',y) print(z,',',w) f = input('Enter the type of proportion in small case:') if f == 'direct' or f == 'direct proportion': e = input('Do you want to stop:') while e == ' No' or e == 'no' or e == 'NO': d = input('Do you want to stop:') if d == 'yes': break else: a = int(input('Enter the first number: ')) b = int(input('Enter the second number: ')) c = int(input('Enter the third number: ')) DP(a,b,c) elif f == 'inverse' or f == 'inverse proportion': e = input('Do you want to stop:') while e == ' No' or e == 'no' or e == 'NO': d = input('Do you want to stop:') if d == 'yes': break else: a = int(input('Enter the first number: ')) b = int(input('Enter the second number: ')) c = int(input('Enter the third number: ')) DP(a,b,c)

8th Feb 2021, 3:19 PM
Science Buster
Science Buster - avatar
1 Answer
+ 2
you should check your indentation ^^
8th Feb 2021, 3:20 PM
visph
visph - avatar