TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #273 · 26 јул.

В стандартном модуле 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

Резултати

Пронајдени 14 слични објави

Пребарај: #yeah

当前筛选 #yeah清除筛选
Mountstorm notes

@mountstorm · Post #653 · 16.07.2023 г., 04:16

That Eye Blunt Injury The incident of a blunt eye injury during a football game caused me to spend a week alone in the hospital, which led to the discovery of my sense of self. I associate mostly with being a student, as I have always been passionate about learning and developing my knowledge. However, the experience of the injury made me realize that being cautious and aware of my surroundings is also a defining part of my identity. As a student, I am constantly learning and growing, but as someone who has suffered an injury, I am also aware of my vulnerability. This experience has taught me to be more careful and attentive in my day-to-day life, especially when participating in physical activities. Overall, the experience has helped me to redefine my identity and to appreciate the importance of taking care of myself. #yeah

Hashtags

Mountstorm notes

@mountstorm · Post #170 · 30.05.2022 г., 08:15

Summer. High School graduates still have the aftertaste of the graduation party and now are preoccupied with summer holidays. While my bro, a 9th grade graduate, can chill for the entire season, he will work on his academic interests and chill. Along with participating in extracurricular summer programs, he will be reading books, however cliche it sounds. Reading a book is like investing in real-estate. As long as you get the right book/estate, you are in a slowly-but-surely growing business. No need for a solid schedule or a measurable goal - how many pages to read daily, specific deadlines - in the beginning. Planning is important, I'd say, when and if there is already a vivid picture of what exactly you need and want to read. I started the process with whatever I had in hand - a fairy-tale collection, a magazine, or a random novel. Bit by bit, it's been getting more clear what genre/author's style is mine and what book to read next. The difference between a "good" book and a "bad" one for me is the first ten pages. Asking for advice on what to read from others is also better done in later stages, I believe. Suggested books are better added to the foundation laid by you. #yeah

Hashtags

12
ПретходнаСтраница 1 од 2Следна