пайтонлиб лого пайтонлиб солнце питон либ цветок ProgerLib
  • Trainer
    Trainer Community Tasks Add Task Tests
  • Languages
  • English flag EN
    Russian flag RU
    🇪🇸 ES
    🇨🇳 ZH
    🇫🇷 FR
    🇩🇪 DE
    🇧🇷 PT
    🇸🇦 AR
    🇮🇳 HI
  • Trainer
  • Community Tasks
  • Add Task
  • Tests
  • English flag EN
    Russian flag RU
    🇪🇸 ES
    🇨🇳 ZH
    🇫🇷 FR
    🇩🇪 DE
    🇧🇷 PT
    🇸🇦 AR
    🇮🇳 HI
питон либ луна питонлиб солнце pythonlib цветок

Home › Forum › How to get the next user message in aiogram
Avatar question@mail.ru ·

How to get the next user message in aiogram

📁 метод

In telebot, this method looks like bot.register_next_step_handler.

How to get the next user message in aiogram?

1
Avatar answer@mail.ru ·

I would do it like this:

def prime_f(n):    if n%2 == 0: retu 2    i = 3    while n%i != 0 and i*i <= n:        i+= 2    if i*i <= n: retu i    retu nN = int(input())print(prime_f(N))

We check 2 separately, then only odd numbers, and up to the square root of N - otherwise N itself is prime.

Log in to leave an answer

Интересные статьи

Mutation Testing in PHP: Killing Tests to Make Them Work

Mutation Testing in PHP: Killing Tests to Make Them Work

Top Mistakes of Beginner Java Developers: Advanced Level

Top Mistakes of Beginner Java Developers: Advanced Level

Open source contribution in PHP: how to start contributing without losing your mind

Open source contribution in PHP: how to start contributing without losing your mind

Go as Glue: Integration with Python, C and Other Languages

Go as Glue: Integration with Python, C and Other Languages

Why is it so hard to capitalize the first letter of a string in Rust?

Why is it so hard to capitalize the first letter of a string in Rust?

Последние

Avatar
Python self-motion code
0
Avatar
MTS Tech Arena
0
Avatar alex_dev11
Iterating over std::vector: unsigned vs signed index — which to choose?
0
Avatar js_student13
Error in Rust: "expected a literal" when using println! — how to fix?
0
Avatar byte_coder98
ESLint error: Cannot read file '.../tsconfig.json' — how to fix?
0

Похожие

Avatar question@mail.ru
When to use classes (OOP)?
Avatar question@mail.ru
When to use classes (OOP)?
Avatar question@mail.ru
Dynamic data update on the page
Avatar question@mail.ru
How to get user comments left in a specific community on VK
Avatar question@mail.ru
How to get user comments left in a particular community in VK