write a program to count numbers in python
Answers
Answered by
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
8
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
Hindi,
3 months ago
Biology,
3 months ago
Social Sciences,
3 months ago
History,
7 months ago
English,
7 months ago
History,
1 year ago
Political Science,
1 year ago
Math,
1 year ago