PYTHON_PROGRAMMING_CHALLENGES Telegram 74
Found very intersting approach to count the digits of an integers #python:

from math import floor, log10


def count_digits(n):
return 1 + floor(log10(n))

In [2]: count_digits(5)
Out[2]: 1

In [3]: count_digits(999)
Out[3]: 3

In [4]: count_digits(1000)
Out[4]: 4



tgoop.com/python_programming_challenges/74
Create:
Last Update:

Found very intersting approach to count the digits of an integers #python:

from math import floor, log10


def count_digits(n):
return 1 + floor(log10(n))

In [2]: count_digits(5)
Out[2]: 1

In [3]: count_digits(999)
Out[3]: 3

In [4]: count_digits(1000)
Out[4]: 4

BY 🇺🇦 Python Programming Сhallenges


Share with your friend now:
tgoop.com/python_programming_challenges/74

View MORE
Open in Telegram


Telegram News

Date: |

With the sharp downturn in the crypto market, yelling has become a coping mechanism for many crypto traders. This screaming therapy became popular after the surge of Goblintown Ethereum NFTs at the end of May or early June. Here, holders made incoherent groaning sounds in late-night Twitter spaces. They also role-played as urine-loving Goblin creatures. 1What is Telegram Channels? To view your bio, click the Menu icon and select “View channel info.” While the character limit is 255, try to fit into 200 characters. This way, users will be able to take in your text fast and efficiently. Reveal the essence of your channel and provide contact information. For example, you can add a bot name, link to your pricing plans, etc. Activate up to 20 bots
from us


Telegram 🇺🇦 Python Programming Сhallenges
FROM American