Computer Science, asked by graacemariyaraju, 7 months ago

write a program to count numbers in python

Answers

Answered by vaghdevi888
0

Answer:

def char_frequency(str1):

dict = {}

for n in str1:

keys = dict.keys()

if n in keys:

dict[n] += 1

else:

dict[n] = 1

return dict

This looks a bit Difficult but your phython is Ready;)

Answered by ItzInnocentKudi
8

\large{\underline{\mathrm{\blue{☯ AnSwEr :-}}}}

Python Program to Count the Number of Digits in a Number

  • Take the value of the integer and store in a variable.

  • Using a while loop, get each digit of the number and increment the count each time a digit is obtained.

  • Print the number of digits in the given integer.

  • Exit.
Similar questions