mardi 13 octobre 2020

Break statement not working in while loop

call = 1
while call < 15:
    def play_again(con):
        con = con.lower()
        if con == 'y':
            lot(user=int(input("type a random (between 1 to 7) no. to win lottery: ")), v=1, y=7,)
        else:
            break
play_again(input("want to play again (y/any other key): "))
call = call+1

Aucun commentaire:

Enregistrer un commentaire