def kontrol():
    x = random.randrange(1, 3)
    if (x == 1):
        print('sagabak')
        servo(3)
        time.sleep(0.05)
        dis = distance('cm')
        print(dis)
        if (dis < 15):
            print('solabak')
            servo(9)
            dis = distance('cm')
            if (dis < 15):
                print('cik')
                servo(5.5)
                geri(2, hiz)
            else:
                servo(5.5)
                geri(0.5, hiz)
                sol(0.7, hiz)
        else:
            servo(5.5)
            geri(0.5, hiz)
            sag(0.7, hiz)
    if (x == 2):
        print('solabak')
        servo(9)
        time.sleep(0.05)
        dis = distance('cm')
        print(dis)
        if (dis < 15):
            print('sagabak')
            servo(3)
            dis = distance('cm')
            if (dis < 15):
                print('cik')
                servo(5.5)
                geri(2, hiz)
            else:
                servo(5.5)
                geri(0.5, hiz)
                sag(0.7, hiz)
        else:
            servo(5.5)
            geri(0.5, hiz)
            sol(0.7, hiz)
def kontrol():
    x = random.randrange(1, 3)
    if (x == 1):
        print('sagabak')
        servo(3)
        time.sleep(0.05)
        dis = distance('cm')
        print(dis)
        if (dis < 15):
            print('solabak')
            servo(9)
            dis = distance('cm')
            if (dis < 15):
                print('cik')
                servo(5.5)
                geri(2, hiz)
            else:
                servo(5.5)
                geri(0.5, hiz)
                sol(0.7, hiz)
        else:
            servo(5.5)
            geri(0.5, hiz)
            sag(0.7, hiz)
    if (x == 2):
        print('solabak')
        servo(9)
        time.sleep(0.05)
        dis = distance('cm')
        print(dis)
        if (dis < 15):
            print('sagabak')
            servo(3)
            dis = distance('cm')
            if (dis < 15):
                print('cik')
                servo(5.5)
                geri(2, hiz)
            else:
                servo(5.5)
                geri(0.5, hiz)
                sag(0.7, hiz)
        else:
            servo(5.5)
            geri(0.5, hiz)
            sol(0.7, hiz)