To print the number of occurrences of a given alphabet in a given string.
Answers
Answered by
2
Answer:
string a ={"1,2,3,4,5"}
system.out.print (string.lenth)
Answered by
0
answer:
string = input("Please enter your own String : ")
char = input("Please enter your own Character : ")
count = 0
for i in range(len(string)):
if(string[i] == char):
count = count + 1
print("The total Number of Times ", char, " has Occurred = " , count)
Similar questions
Math,
15 hours ago
Social Sciences,
15 hours ago
Math,
15 hours ago
English,
1 day ago
Science,
1 day ago
Science,
8 months ago
Math,
8 months ago
Business Studies,
8 months ago