Files
LazyMath/HowManyNumbersWithThisDigit/HowManyNumbersWithThisDigit.py
BarsTiger 289e9341ac Added HowManyNumbersWithThisDigit.py
Added README for HowManyNumbersWithThisDigit.py
2021-08-29 14:04:54 +03:00

21 lines
453 B
Python

print("©KOTIKOT, script by BarsTiger")
print()
typeFrom = int(input("All numbers from: "))
typeTo = int(input("All numbers to: "))
whichDigit = int(input("What should I find: "))
allNumbers = []
digitCount = 0
for i in range(typeTo - typeFrom + 1):
allNumbers.append(typeFrom + i)
for n in allNumbers:
if str(whichDigit) in str(n):
digitCount += 1
print()
print("I found " + str(digitCount) + " " + str(whichDigit) + "'s")
input()