В стандартном модуле random есть две очень похожие функции
random.randint()
random.randrange()
Обе возвращают случайное значение из указанного диапазона
>>> random.randint(10, 20)
12
>>> random.randrange(10, 20)
17
В чем же отличие?
Дело в том что у randrange() есть третий параметр step.
randint() действительно возвращает случайное число из указанного диапазона.
randrange() на первый взгляд делает тоже самое если передать также два параметра.
Но есть указать еще и step то наш диапазон усложняется, то есть в него попадёт не полный ряд значений.
Например, я хочу получить случайное значение из диапазона но только чётное число. Тогда достаточно сделать так:
>>> randrange(10, 20, 2)
16
Таким образом получается что randint это частный случай randrange без указания параметра step.
Еще одно важное отличие в том, что randint() включает в диапазон второе значение а randrange() нет. То есть выражение randrange(10, 20) никогда не вернёт 20, а randint(10, 20) вернёт.
#tricks#basic
🚀🚀 Another massive profit made in Premium Group and this time it is#AXS/USDT which crossed All the Profit Targets for an humongous gain of 99%
🗨Contact @futurechief to enter the Binance Futures/Bybit/Kucoin/OKX Premium Signal Group & Receive daily high quality signals by being in the Premium Group
🚀🚀 Consistent profit on all the Premium signals - 315% profit made on #AXS/USDT - All profit targets covered
🎯🎯Contact - @futurechief for Premium Access
🎯🎯 Non Stop Huge profit on Premium signals for all Premium Members
🔥🔥#AXS/USDT has crossed all the profit targets and made a great profit of 734%
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gains
#AXS/USDT analysis :
#AXS is retracing towards the 200 EMA and is expected to retest this level before continuing its bearish momentum. The current level presents a favorable opportunity for a long entry, with the swing high resistance level identified as the target.
TF : 4H
Entry : $4.444
Target : $4.990
SL : $4.160
🚀🚀 315% Profit on #AXS/USDT for our Premium Members on Binance Futures/Bybit/OKXX/Kucoin/Bitget
✅✅ All target completed
👁🗨Contact @primemod to enter the Premium Group for high quality SPOT & FUTURES Signals