Answer the question
In order to leave comments, you need to log in
How can I make sure that if the numbers in the interval were in the tuple a certain number of times, the condition is fulfilled?
Hello, there is a tuple with numbers
count = (5.60, 1.44, 1.32, 4.90, 2.97, 4.37, 7.18, 1.52, 1.20, 1.48, 1.45, 1.23, 3.58, 1.16, 0, 3.20, 3.36, 3.06, 12.78,
1.16, 1.17, 1.06, 1.23, 2.04, 5.21, 1.00, 1.32, 1.05, 5.33, 1.08, 4.29, 3.14, 1.04, 0, 1.22, 1.44, 1.00, 0, 1.55, 2.35,
1.98, 2.07, 1.82, 1.34, 4.12, 5.64, 1.16, 2.63, 1.97, 1.66, 2.70, 1.09, 24.37, 2.73, 1.30, 1.41, 1,103.24, 1.25, 0,
16.82, 1.03, 0, 1.20 ... )
number = 1 # number for tuple
while True:
if count[number] == 1.32:
print('Игра 1.32 нашлась на месте ' + str(number))
break
else:
number += 1
kf_waits_ot = 1.32 # начало промужутка кф, от
kf_waits_do = 10 # окончание промежутка кф, до
kf_waits_ot = 1.32 # начало промужутка кф, от
kf_waits_do = 1.45 # окончание промежутка кф, до
number_kf_waits = 2 # кол-во раз сколько числа из промежутка должны выпасть
while True:
if count[number] >= kf_waits_ot and count[number] <= kf_waits_do:
if number_kf_waits != number:
number += 1
print('False')
else:
print('True, bet allow')
break
else:
number += 1
print('Число не подходит в промежуток, следующее...')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question