mercredi 8 février 2023

randomly choose one of variables and add +1 [closed]

I need some help in Pyhton, i have two variables, if they are equal I want randomly add +1 to one of two available variables, thanks

teklipa = 0
teklipb = 0

for i in adamlar:
    a = int(input (f"{i} haysi at has gowy senin ucin 1.{teklipler[0]} ya-da 2.{teklipler[7]} "))
    ses=a
    if ses == 1:
                teklipa = teklipa+1
    elif ses == 2:
                teklipb = teklipb+1
    else:
        
                
if teklipa>teklipb:
    round1.extend ({teklipler[0]})
else:
    round1.extend ({teklipler[7]})



Aucun commentaire:

Enregistrer un commentaire