Problem:
Counting Characters Write a program which counts and reports the number of each alphabetical letter. Ignore the case of characters. Input A sentence in English is given in several lines. Output Prints the number of alphabetical letters in the following format: a : The number of 'a' b : The number of 'b' c : The number of 'c' .
  .
z : The number of 'z'  Constraints  The number of characters in the sentence < 1200  Sample Input This is a pen. Sample Output a : 1
b : 0
c : 0
d : 0
e : 1
f : 0
g : 0
h : 1
i : 2
j : 0
k : 0
l : 0
m : 0
n : 1
o : 0
p : 1
q : 0
r : 0
s : 2
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0

Solution (Python):
import string
import sys


def main():
    str1 = sys.stdin.read()
    dict1 = {}
    for char in str1.lower():
        if not char.isalpha():
            continue
        elif dict1.__contains__(char):
            dict1[char] += 1
        else:
            dict1[char] = 1
    for char in string.ascii_lowercase:
        print(char + ' : ' + (str(dict1[char]) if dict1.__contains__(char) else '0'))


if __name__ == '__main__':
    main()

Solution (Python):
import sys

cnt = {}

for line in sys.stdin:
  for l in line:
    if l.isalpha():
      c = l.lower()
      cnt[c] = cnt.get(c,0)+1

for i in range(26):
  c = chr(ord('a')+i)
  print( c, " : ", cnt.get(c,0), sep = '' )

Solution (Python):
import sys
def main():

    cnt = {}
    for i in range(97,123):
        cnt[chr(i)] = 0
    

    for passages in sys.stdin:
        for psg in passages:
            psglower = psg.lower()
            for s in psglower:
                if s.isalpha():
                    cnt[s] += 1

    for i in range(97,123):
        s = chr(i)
        print(s, ':', cnt[s])

if __name__ == '__main__':
    main()

Solution (Python):
import sys
def main():

    cnt = {}
    for i in range(ord('a'),ord('z')+1):
        cnt[chr(i)] = 0

    for passages in sys.stdin:
        for psg in passages:
            psglower = psg.lower()
            for s in psglower:
                if s.isalpha():
                    cnt[s] += 1

    for i in range(ord('a'),ord('z')+1):
        s = chr(i)
        print(s, ':', cnt[s])

if __name__ == '__main__':
    main()

Solution (Python):
import sys

cnt = {}

for line in sys.stdin:
    for s in line:
        if s.isalpha():
            c = s.lower()
            cnt[c] = cnt.get(c,0)+1

for i in range(26):
    c = chr(ord('a')+i)
    print( c, " : ", cnt.get(c,0), sep = '' )

Solution (Python):
import sys
def main():

    cnt = {}
    for i in range(ord('a'),ord('z')+1):
        cnt[chr(i)] = 0

    for passages in sys.stdin:
        for psg in passages:
            psglower = psg.lower()
            for s in psglower:
                if s.isalpha():
                    cnt[s] += 1

    for i in range(ord('a'),ord('z')+1):
        s = chr(i)
        print(s, ':', cnt[s])

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import string

def main():
    chars = {x:0 for x in string.ascii_lowercase}

    for line in sys.stdin:
        for ch in line.lower():
            if ch in chars:
                chars[ch] += 1

    for ch in string.ascii_lowercase:
        print(ch+" : "+str(chars[ch]))

if __name__ == '__main__':
    main()

Solution (Python):
import sys

s = ""
for line in sys.stdin:
    s+=line
s=s.lower()
for str in list("abcdefghijklmnopqrstuvwxyz"):
    print(*[str,":",s.count(str)])

Solution (Python):

bigALlist = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
smoALlist = list('abcdefghijklmnopqrstuvwxyz')
cnt = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
while True:
    try:
        text = list(input())
        for j in range(len(bigALlist)):
            for i in text:
                if (bigALlist[j] in i) or (smoALlist[j] in i):
                    cnt[j] = cnt[j] + 1
    except EOFError:
        break
for j in range(len(bigALlist)):
    print('{0} : {1}'.format(smoALlist[j],cnt[j]))

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except:
        break
        
for key in alpha:
        print('{} : {}'.format(key, text.count(key)))

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except:
        break
 
[print('{} : {}'.format(key, text.count(key))) for key in alpha]

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except EOFError:
        break

for a in alpha:
    print('{} : {}'.format(a, text.count(a)))

Solution (Python):
import sys
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
C = []
b = ""
for line in sys.stdin:
    a = line.lower()
    b += a
for i in range(len(alpha)):
    k = b.count(alpha[i])
    C.append(k)
for i in range(len(alpha)):
    print(alpha[i]+" :",C[i])

Solution (Python):

import string
d = {}
for ch in list(string.ascii_lowercase):
    d[ch] = 0
    
while True:
    try:
        s = list(input().lower())
    except EOFError:
        break
    
    
    for ch in s:
        if ch.isalpha():
            d[ch] += 1
        else:
            pass
    

for k, v in sorted(d.items()):
    print('{} : {}'.format(k, v))

Solution (Python):
import sys
s = sys.stdin.read().lower()
for i in range(ord("a"), ord("z")+1):
    print(chr(i), ":", s.count(chr(i)))

Solution (Python):
import sys
s = sys.stdin.read()
s = s.lower()
c = 97
while chr(c-1)!='z':
    print('{0} : {1}'.format(chr(c),s.count(chr(c))))
    c += 1

Solution (Python):
from string import ascii_lowercase
import sys
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))

for s in sys.stdin:
    for c in s:
        if c.lower() in table:
            table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i] += 1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i] += 1
for c, t in zip(ascii_lowercase, ans):
    print("%s : %d" % (c, t))

Solution (Python):
alp_count = [0]*26



string = open(0).read()
string = string.lower()


alp = [chr(ord("a")+i) for i in range(26)]

c = 0

for j in range(26):
    c = string.count(alp[j])
    alp_count[j] += c
    print("%s : %d"%(alp[j],alp_count[j]))

Solution (Python):
import sys
input_str = sys.stdin.read()
table = [0]*26
letters = "abcdefghijklmnopqrstuvwxyz"
for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1
for i in range(len(letters)):
    print("{} : {}".format(letters[i],table[i]))

Solution (Python):
import sys
s=sys.stdin.read().lower()

for i in range(26):


    s.count(chr(97+i))

    print(chr(97+i)+" : "+str(s.count(chr(97+i))))

Solution (Python):
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in sys.stdin.read().lower():
    if c.islower():
        count[c] = count[c] + 1
for k, v in count.items():
    print(f"{k} : {v}")

Solution (Python):
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in list(sys.stdin.read().lower()):
    if c.islower():
        count[c] = count[c] + 1
for k, v in count.items():
    print(f"{k} : {v}")

Solution (Python):
from sys import stdin
from string import ascii_lowercase

count_let = {k : 0 for k in ascii_lowercase}

s = list(stdin.read().rstrip().lower())
for c in s:
    count_let[c] = count_let.get(c, 0)+1

for k, v in sorted(count_let.items()):
    if k in ascii_lowercase:
        print("{} : {}".format(k, v))

Solution (Python):
import sys
data = sys.stdin.read()
letters = 'abcdefghijklmnopqrstuvwxyz'
for letter in letters:
    count = 0
    for d in data:
        if letter == d.lower():
            count += 1
    print(f'{letter} : {count}')

Solution (Python):
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
			'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
			'w','x', 'y', 'z']

dic = {}
for c in alphabet:
	dic[c] = 0

while True:
	try:
		string = list(input().rstrip().lower())
	except EOFError:
		break

	for c in string:
		if c in alphabet:
			dic[c] = dic[c] + 1

for key in dic:
	print('{} : {}'.format(key, dic[key]))

Solution (Python):
import sys
l = ""
for i in sys.stdin.readlines():
    l += i.lower().rstrip()
word = "abcdefghijklmnopqrstuvwxyz"
for i in word:
    n = l.count(i)
    print("{} : {}".format(i,n))

Solution (Python):
text = ""
while 1:
    try:
        x = input()
        text += x
    except EOFError:
        break
text_new = text.lower()
alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
for i in alphabet:
    tmp = 0
    for j in text_new:
        if j == i:
            tmp += 1
    print(i + " : " + str(tmp))

Solution (Python):
import sys
s = sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys

alp=[]
for i in range(97,97+26):
	alp.append(chr(i))

s=sys.stdin.read().lower()

for i in alp:
	num=0
	for j in s:
		if i==j:
			num+=1
	print(i+' : '+str(num))

Solution (Python):
import string
import sys
text = sys.stdin.read().lower()
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))

Solution (Python):
moji=""
while True:
	try:
		t = input()
		moji += t.lower()
	except :
		break
moji2 = [chr(i) for i in range(97,97+26)]

for j in moji2:
	print(j+" : "+str(moji.count(j)))

Solution (Python):
table = [0] * 26
string = []
while True:
  try:
    string += list(input())
  except EOFError:
    break

for s in string:
  n = ord(s.lower()) - 97
  if n >= 0 and n <= 25:
    table[n] += 1

for idx, s in enumerate(table):
  print(chr(idx + 97) + " : " + str(s))

Solution (Python):
letter="abcdefghijklmnopqrstuvwxyz"
table=[0]*26
while True:
    try:
        input_str=input()
    except:
        break
    for A in input_str:
        index=0
        for B in letter:
            if A == B or A == B.upper():
                table[index] += 1
                break
            index += 1

for i in range(len(letter)):
    print("%s : %d"%(letter[i],table[i]))

Solution (Python):
a = "abcdefghijklmnopqrstuvwxyz"
b = ''
while 1:
    try:
        b += input().lower()
    except:
        break
for i in range(26):
    print(a[i],':',b.count(a[i]))

Solution (Python):
a = "abcdefghijklmnopqrstuvwxyz"
b = ''
while 1:
    try:
        b += input().lower()
    except:
        break
for i in range(26):
    print(a[i],':',b.count(a[i]))

Solution (Python):

import sys

table = [0]*26

letters = [chr(i) for i in range(97, 97+26)]
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i], table[i]))

Solution (Python):
st=[]

while True:
  try:
    n=input()
    if n=="":
      break
    st += n.lower()
  except:
    break
   
char = "abcdefghijklmnopqrstuvwxyz"
for i in range(len(char)):
  print(char[i],":",st.count(char[i]))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys
x = ""
x = sys.stdin.read()




alist = list(x)
alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
ALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
aa = [0]*27
for num in alist:
    itr =0
    for alp in alphabet:
        if num == alp:
            aa[itr] += 1
            break;
        itr += 1
    itr = 0
    for ALP in ALPHABET:
        if num == ALP:
            aa[itr] += 1
            break;
        itr += 1
for i in range(26):
    print("{} : {}".format(alphabet[i], aa[i]))

Solution (Python):
import sys

data = sys.stdin.read()
for i in range(0x61,0x7b):
    print("%c : %d"  %(i,data.lower().count(chr(i))))

Solution (Python):
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()): cnts[c] = cnts.get(c,0) + 1
  
for c in range(ord('a'),ord('z')+1): print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()): cnts[c] = cnts.get(c,0) + 1
   
for c in range(ord('a'),ord('z')+1): print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):print(chr(i),':',s.count(chr(i)))

Solution (Python):
D = [0 for i in range(26)]
while True:
    s = ''
    try:
        s = raw_input()
    except (EOFError):
        break
        
    for c in s:
        d = ord(c)
        idx = -1
        if d >= ord('a') and d <= ord('z'):
            idx = d - ord('a')
        if d >= ord('A') and d <= ord('Z'):
            idx = d - ord('A')
        if idx >= 0:
            D[idx] = D[idx] + 1

for i in range(0,26):
    c = chr(i + ord('a'))
    print c + " : " + str(D[i])

Solution (Python):
s = ""
while True:
    try:
        x = raw_input()
    except:
        break
    s += x
s = s.lower()

for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Solution (Python):
s = ""
while True:
    try:
        x = raw_input().lower()
    except:
        break
    s += x

for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Solution (Python):
s = []
while 1:
	try :
		x = raw_input()
	except :
		break
	s.append(x.lower())
s = ''.join(s)

for i in range(26):
	c = chr(i + 97)
	print '%s : %d' % (c , s.count(c))

Solution (Python):
import sys
l=[0]*26
for h in sys.stdin:
    for i in h:
        k=ord(i.lower())
        if 96<k<123:l[k-97]+=1
for i in range(26):print chr(i+97),':',l[i]

Solution (Python):
a = 'abcdefghijklmnopqrstuvwxyz'
b = [0 for i in range(len(a))]
while True:
	try:
		S = raw_input().lower()
	except:
		break
	for j in range(26):
		b[j] += S.count(a[j])
for i in range(len(a)):
	print str(a[i])+" : "+str(b[i])

Solution (Python):
import string
az = list(string.ascii_lowercase)
li = [0 for a in range(len(az))]

while True:
    try:
        a = raw_input()
        for b in list(a):
            if b.lower() in az:
                tmp = az.index(b.lower())
                li[tmp] = li[tmp] + 1
    except:
        break

for c in range(len(az)):
    print az[c] + ' : ' + str(li[c])

Solution (Python):
import sys, string

lines = []
for line in sys.stdin:
    lines.append(line)

text = ''.join(lines).lower()
    
for char in string.ascii_lowercase:
    print("{} : {}".format(char, text.count(char)))

Solution (Python):
keys = ([chr(x) for x in range(ord('a'), ord('a') + 26)])
counts = {x:0 for x in keys}

while True:
    text = ''
    try:
        text = input()
    except EOFError:
        break

    for i in range(len(text)):
        target = text[i].lower()
        if 'a' <= target <= 'z':
            counts[target] += 1

for k in keys:
    print(k, counts[k], sep=' : ')

Solution (Python):
alphabetTable = dict.fromkeys([chr(i) for i in range(97, 123)], 0)

while True:
    try:
        for text in input():
            for i in range(len(text)):
                if text[i].lower() in alphabetTable:
                    alphabetTable[text[i].lower()] += 1
    except EOFError:
        break

for r in sorted(alphabetTable):
    print(r,':',alphabetTable[r])

Solution (Python):
a = {x:0 for x in range(ord('a'), ord('z') + 1)}

while True:
    try:
        text = input()
        for x in text:
            if ord('a') <= ord(x) <= ord('z') or ord('A') <= ord(x) <= ord('Z'):
                a[ord(x.lower())] += 1
    except EOFError:
        break

for x in range(ord('a'), ord('z') + 1):
    print(chr(x), ':', a[x])

Solution (Python):
s = ""
while True:
    try:
        x = raw_input().lower()
    except:
        break
    s += x
 
for i in range(26):
    c = chr(i + ord('a'))
    print('%s : %d' %(c, s.count(c)))

Solution (Python):
count = {}
for i in range(26):
    count[(i)] = 0

while True:
    try:
        x = raw_input()
    except:
        break
    for i in range(len(x)):
        if(ord('a') <= ord(x[i]) and ord(x[i]) <= ord('z')):
            count[(ord(x[i])-ord('a'))] += 1
        elif(ord('A') <= ord(x[i]) and ord(x[i]) <= ord('Z')):
            count[(ord(x[i])-ord('A'))] += 1

for i in range(26):
    print '%s : %d' %(chr(i+ord('a')), count[(i)])
exit(0)

Solution (Python):
import sys
s = sys.stdin.read()
for c in [chr(i) for i in range(97,97+26)]:
    print(c, ":", s.lower().count(c))

Solution (Python):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
dic = {}
for ch in alphabet:
    dic[ch] = 0
    
while True:
    try:
        st = raw_input()
    except EOFError:
        break

    for ch in st:
        try:
            dic[ch.lower()] +=1
        except:
            pass
for k in sorted(dic.keys()):
    print k +' : ' + str(dic[k])

Solution (Python):
import collections
import string

def solve(s):
    s = s.lower()
    counter = collections.Counter(s)
    lows = string.ascii_lowercase
    cnt = [counter[ch] for ch in lows]
    for (ch, n) in zip(lows, cnt):
        print('{0} : {1}'.format(ch, n))

if __name__ == '__main__':
    s = ''
    while True:
        try:
            s += input()
        except:
            break
    solve(s)

Solution (Python):


sentence = ''
while True:
    try:
        sentence += input().lower()
    except:
        break

for i in range(ord('a') , ord('z') + 1):
    print('{} : {}'.format(chr(i),sentence.count(chr(i))))

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0

lines = sys.stdin.readlines()
for i in range( len( lines ) ):
	for j in range( len( lines[i] ) ):
	    if lines[i][j].isalpha():
	        chash[ lines[i][j].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0

lines = sys.stdin.readlines()
for i in range( len( lines ) ):
	for j in range( len( lines[i] ) ):
	    if lines[i][j].isalpha():
	        chash[ lines[i][j].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
for line in sys.stdin:
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
for line in sys.stdin:
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
while True:
    line = sys.stdin.readline().rstrip()
    if not line:
        break
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys
 
chash = {}
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    chash[ chr( i ) ] = 0
 
while True:
    line = sys.stdin.readline().rstrip()
    if not line:
        break
    for i in range( len( line ) ):
        if line[i].isalpha():
            chash[ line[i].lower() ] += 1
 
for i in range( ord( 'a' ), ord( 'z' )+1 ):
    print( "{:s} : {:d}".format( chr( i ), chash[ chr( i ) ] ) )

Solution (Python):
import sys;
Dic={'a':0,'b':0,'c':0,'d':0,'e':0,'f':0,'g':0,'h':0,'i':0,'j':0,'k':0,'l':0,'m':0,'n':0,'o':0,'p':0,'q':0,'r':0,'s':0,'t':0,'u':0,'v':0,'w':0,'x':0,'y':0,'z':0 }
while True:
	lit=sys.stdin.readline().rstrip().lower()
	if not lit: break
	for i in lit:
		if ord('a')<=ord(i)<=ord('z'):
			Dic[i]+=1
Key=Dic.keys()
Key.sort()
for key in Key:
	print key, ":" ,Dic[key]

Solution (Python):
s = ""
while True:
    try:
        s += input().lower()
    except:
        break

for c in [chr(i) for i in range(ord('a'), ord('z') + 1)]:
    print(c, ":", s.count(c))

Solution (Python):
import sys
from collections import Counter

c = Counter()
for line in sys.stdin.readlines():
    c.update(line.lower())
for a in 'abcdefghijklmnopqrstuvwxyz':
    print a + ' :', c.get(a, 0)

Solution (Python):
a = ord('a')
counts = [0] * 26
while 1:
    try:
        raw = input()
    except EOFError:
        break
    for c in raw.lower():
        if 0 <= ord(c) - a < 26:
            counts[ord(c) - a] += 1
for i, count in enumerate(counts):
    print('%s : %d' % (chr(a + i), count))

Solution (Python):
import sys

dic = {}
for i in xrange(97, 123):
  dic.setdefault(chr(i), 0)

line = ""
while True:
  try:
    temp = raw_input()
    
    if temp != "":
      line += temp
    else:
      break
  except:
    break



for i in xrange(len(line)):
  try:
    if line[i].lower() in dic:
      dic[line[i].lower()] += 1
  except TypeError:
    continue

  
for i in xrange(97, 123):
  print chr(i) + " : " + str(dic[chr(i)])

Solution (Python):
sentence = ''
while True:
    try:
        sentence += input().lower()
    except:
        break
 
for i in range(ord('a') , ord('z') + 1):
    print('{} : {}'.format(chr(i),sentence.count(chr(i))))

Solution (Python):
docs = ''
while True:
    try:
        s = raw_input()
    except:
        break
    docs += s.lower()
for ascii_num in range(97, 123):
    print '%s : %d' % (chr(ascii_num), docs.count(chr(ascii_num)))

Solution (Python):

alphabet = [0]*26
i = 0;
for j in range(97,123):
	alphabet[i] = chr(j)
	i += 1
al_count = [0]*26
while True :
	try :
		words = raw_input().lower().split()
		for k in words :
			for l in list(k):
				if l=='a':
					al_count[0] += 1
				elif l=='b':
					al_count[1] += 1
				elif l=='c':
					al_count[2]+=1	
				elif l=='d':
					al_count[3] += 1
				elif l=='e':
					al_count[4]+=1
				elif l=='f':
					al_count[5] += 1
				elif l=='g':
					al_count[6]+=1
				elif l=='h':
					al_count[7] += 1
				elif l=='i':
					al_count[8]+=1
				elif l=='j':
					al_count[9] += 1
				elif l=='k':
					al_count[10]+=1	
				elif l=='l':
					al_count[11] += 1
				elif l=='m':
					al_count[12]+=1	
				elif l=='n':
					al_count[13] += 1
				elif l=='o':
					al_count[14]+=1
				elif l=='p':
					al_count[15] += 1
				elif l=='q':
					al_count[16]+=1
				elif l=='r':
					al_count[17] += 1
				elif l=='s':
					al_count[18]+=1
				elif l=='t':
					al_count[19] += 1
				elif l=='u':
					al_count[20]+=1
				elif l=='v':
					al_count[21]+=1
				elif l=='w':
					al_count[22] += 1
				elif l=='x':
					al_count[23]+=1
				elif l=='y':
					al_count[24] += 1
				elif l=='z':
					al_count[25]+=1
	except :
		break
for i in range(26):
	print '%c : %d' %(alphabet[i],al_count[i])

Solution (Python):
import string
import sys

input_str = ""

for i in sys.stdin:
    input_str += i

for i in range(26):
    char = string.ascii_lowercase[i]
    CHAR = string.ascii_uppercase[i]
    cnt = input_str.count(char) + input_str.count(CHAR)
    print("{0} : {1}".format(char, cnt))

Solution (Python):
import string
import sys

input_str = sys.stdin.read()

for i in range(26):
    char = string.ascii_lowercase[i]
    CHAR = string.ascii_uppercase[i]
    cnt = input_str.count(char) + input_str.count(CHAR)
    print("{0} : {1}".format(char, cnt))

Solution (Python):
import string
data = {}
while True:
    try:
        in_str = raw_input()
        for c in in_str:
            if c.isalpha() == False or c.lower() < 'a' and 'z' < c.lower():
                continue
            if c.lower() in data:
                data[c.lower()] += 1
            else:
                data[c.lower()] = 1
    except(EOFError):
        break
for c in string.lowercase[:26]:
    if c in data:
        print c + ' : ' + str(data[c])
    else:
        print c + ' : 0'

Solution (Python):
from collections import Counter

counter = Counter()

while True:
    try:
        s = input()
        for c in s:
            counter[c.lower()] += 1

    except:
        break

for c in range(ord('a'), ord('z')+1):
    print('{} : {}'.format(chr(c), counter[chr(c)]))

Solution (Python):
def get_input():
    while True:
        try:
            yield ''.join(raw_input().strip())
        except EOFError:
            break
inlist = list(get_input())
instr = "".join(inlist)
instr = instr.lower()
ascstart = 97
ascfin = 122
strlist = [0 for i in xrange(97,122+1)]

for x in xrange(len(instr)):
    if ord(instr[x]) < ascstart or ord(instr[x]) > ascfin:
        continue
    strlist[ord(instr[x])-ascstart] +=1

for x in xrange(ascstart,ascfin+1):
    print "%s : %d" % (chr(x),strlist[x-ascstart])

Solution (Python):
sent=""
while True:
    try:
        ex=input().lower()
        sent+=ex
    except:
        break
for i in range(ord("a"),ord("z")+1):
    x=sent.count(chr(i))
    print(chr(i),":",x)

Solution (Python):
import sys

s = str()
alphabet = "abcdefghijklmnopqrstuvwxyz"

for line in sys.stdin:
    s += line.lower()

for c in alphabet:
    print(c+" : "+str(s.count(c)))

Solution (Python):


import sys


alphabet_list = [chr(i) for i in range(97, 97+26)]
alphabet_dict = {}
for a in alphabet_list:
    alphabet_dict.update({a:0})

for strings in sys.stdin:
    for s in strings:
        if (s.isalpha()):
            s = s.lower()
            alphabet_dict[s] += 1

for key in sorted(alphabet_dict.keys()):
    print(str(key) + ' : '+ str(alphabet_dict[key]))

Solution (Python):
a = [chr(i) for i in range(97, 123)]
line = ''
while True:
    try:
        line += input().lower()
    except:
        break
for c in a:
    print("{0} : {1}".format(c, line.count(c)))

Solution (Python):
import sys
import string

sentence = sys.stdin.read().lower()
for c in string.ascii_lowercase:
    print('{} : {}'.format(c, sentence.count(c)))

Solution (Python):
import sys

printf = sys.stdout.write


abc = []
ans = [0 for i in range(26)]

for i in range(26):
    abc.append(str(chr(i + 97)))


word = []
for line in sys.stdin:
    word.append(line)

for i in range(len(word)):
    for j in range(len(word[i])):
        for k in range(29):
            if (k + 65) == ord(word[i][j]) or (k + 97) == ord(word[i][j]): 
                ans[k] += 1

for i in range(26):
    printf(abc[i] + " : " + str(ans[i]) + "\n")

Solution (Python):
import sys
s = str()
alphabet = "abcdefghijklmnopqrstuvwxyz"
for line in sys.stdin:
	s+=line.lower()
for c in alphabet:
	print(c+" : "+str(s.count(c)))

Solution (Python):
import sys
words = str()
data = "abcdefghijklmnopqrstuvwxyz"
for line in sys.stdin:
    words += line.lower()
for i in data:
    print(i+" : "+str(words.count(i)))

Solution (Python):
import sys

alphabets = range(ord('a'), ord('z') + 1)
dic = { chr(c): 0 for c in alphabets }

text = sys.stdin.read()
for c in text:
  c = c.lower()
  if ord(c) in alphabets:
    dic[c] += 1

for c, n in sorted(dic.items()):
  print(c, ":", n)

Solution (Python):
s = ""
while True:
    try:
        sent = raw_input().lower()
    except:
        break
    s += sent

alphabet = "abcdefghijklmnopqrstuvwxyz"

for i in alphabet:

    result = s.count(i)
    print "%s : %d" %(i,result)

Solution (Python):


sen = ''
while True:
    try:
        buf = raw_input()
    except:
        break
    sen += buf.lower()
for i in range(ord('a'), ord('z')+1):
    print "%s : %d" %(chr(i), sen.count(chr(i)))

Solution (Python):
import sys
abc='abcdefghijklmnopqrstuvwxyz'
sentences = sys.stdin.read()
for letter in abc:
    print( letter + ' : ' + str(sentences.lower().count(letter)))

Solution (Python):
import sys

a = []
for line in sys.stdin:
    a.append(str(line))
a = ''.join(a).lower()

d = {}
for i in "abcdefghijklmnopqrstuvwxyz":
    d[i] = 0
for i in a:
    if i in "abcdefghijklmnopqrstuvwxyz":
        d[i] += 1
for i in "abcdefghijklmnopqrstuvwxyz":
    print i,':',d[i]

Solution (Python):
docs = ''
while True:
    try:
        s = raw_input()
    except:
        break
    docs += s.lower()
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in alphabet:
    print i +' : '+ str(docs.count(i))

Solution (Python):
ip=''
while True:
    try:
        p=raw_input()
    except:
        break
    ip+=p.lower()
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in alphabet:
    print i +' : '+ str(ip.count(i))

Solution (Python):
sequence = ''
while(True):
    try:
        sequence += input()
    except EOFError:
        break

sequence = sequence.lower()
for i in range(ord('a'), ord('z')+1):
    print("%s : %d" % (chr(i), sequence.count(chr(i))))

Solution (Python):
import sys

cnt = [0 for i in xrange(26)]

for e_string in sys.stdin:

	for i in e_string:
		j = ord(i)
		if   j >= 65 and j <= 90:
			cnt[j%65] += 1
		elif j >= 97 and j <= 122:
			cnt[j%97] += 1
		else:
			continue

for i in xrange(26):
	print u"%c : %d" % (chr(97+i), cnt[i])

Solution (Python):
text = ''
while(True):
    try:
        text += input().lower()
    except:
        break

count = [0 for i in range(26)]
for c in text:
    if c < 'a'  or c > 'z':
        continue

    count[ord(c) - ord('a')] += 1

for i, c in enumerate(count):
    print('{0} : {1}'.format(chr(i + ord('a')), c))

Solution (Python):
sentence = ''
while True:
    try:
        sentence += input().lower()
    except:
            break

for i in range(ord('a'), ord('z') + 1):
    print('{} : {}'.format(chr(i),sentence.count(chr(i))))

Solution (Python):



import sys

input_char = []
for line in sys.stdin:
    input_char.append(line)

count_char = "".join(input_char)


countingChar = [0 for i in range(26)]

for i in range(0, len(count_char)):
    if ord(count_char[i].lower()) - ord("a") > -1 and ord(count_char[i].lower()) - ord("a") < 27:
        countingChar[ord(count_char[i].lower()) - ord("a")] += 1

for i in range(0, 26):
    print("{0} : {1}".format(chr(ord("a") + i), countingChar[i]))

Solution (Python):

















































import sys
 
s = str()
alphabet = "abcdefghijklmnopqrstuvwxyz"
 
for line in sys.stdin:
    s += line.lower()
    

 
for c in alphabet:
    print(c+" : "+str(s.count(c)))

Solution (Python):

















































import sys
 
s = str()
alphabet = "abcdefghijklmnopqrstuvwxyz"
 
for line in sys.stdin:
    s += line.lower()
    

 
for c in alphabet:
    print("{} : {}".format(c, s.count(c)) )

Solution (Python):
import sys
cs = { c : 0 for c in list("abcdefghijklmnopqrstuvwxyz")}
for c in list(sys.stdin.read()):
    c = c.lower()
    if c in cs.keys():
        cs[c] = cs[c] + 1
for (c,cnt) in sorted(list(cs.items())):
    print('{0} : {1}'.format(c,cnt))

Solution (Python):
alphabets = "abcdefghijklmnopqrstuvwxyz"



x = ''
while True:
    try:
        x += input().lower()
    except EOFError:
        break

for i in range(len(alphabets)):
    print("{0} : {1}".format(alphabets[i], int(x.count(alphabets[i]))))

Solution (Python):
alphabet = "abcdefghijklmnopqrstuvwxyz"



x = ''
while True:
    try:
        x += input().lower()
    except EOFError:
        break

for i in range(len(alphabet)):
    print("{0} : {1}".format(alphabet[i], int(x.count(alphabet[i]))))