В стандартном модуле 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
#SCRT is rebounding from the support trendline of a falling wedge pattern, showing early signs of recovery.
The 50MA is acting as a resistance barrier above the wedge, limiting upside for now.
A strong breakout of the wedge would confirm bullish momentum and could trigger a solid rally.
#SCRT/USDT analysis :
#SCRT is currently trading within a channel. The price is likely to move upward and test the channel's resistance. It is advisable to wait for a pullback to the support zone for a long entry, as the price is expected to continue its upward movement.
TF : 4h
Entry : $0.1958
Target : $0.2354
SL : $0.1793
#SCRT/USDT analysis :
#SCRT is in a downtrend, consistently trading below the 200 EMA. The price is currently trading in a resistance zone.
It is expected to be rejected from there and will soon continue its downward movement. Wait for the breakout of the $0.1960 level for a short entry; the previous lows will be the target.
TF : 30min
Entry : $0.1960
Target : $0.1742
SL : $0.2094
#SCRT result
1st target achieved in just 1 hour✅
One more quick profit 5%💰🤑
👉 More quick profit signals available in premium channel. Hurry up 🏃♂👇
☎️ Contact @MichaelStrategiesVip