lundi 2 novembre 2020

breaking if statement in python [closed]

I want to break the if statement.

My code is like this:

if a == 0 or d == 0:
    while a>0:
        d=a//b
        c+=1
        a=d//b
        c+=1
    break

I got an error called 'break' outside loop what can I do.

Aucun commentaire:

Enregistrer un commentaire