Answer to Question #338540 in Python for Sonu

Question #338540

Write a python program for check the given digit is repeated how many times in the given number

1
Expert's answer
2022-05-08T14:32:48-0400
N = input("Enter N: ")
search = input("What number are you looking for? ")
number_str = list(N)
count = 0
for i in range(len(number_str)):
    if number_str[i] == search:
        count += 1
print(count)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS