Problem:
Finding a Word Write a program which reads a word W and a text T , and prints the number of word W which appears in text T   T consists of string T i separated by space characters and newlines. Count the number of T i which equals to W . The word and text are case insensitive. Constraints  The length of W ≤ 10  W consists of lower case letters  The length of T in a line ≤ 1000  Input In the first line, the word W is given. In the following lines, the text T is given separated by space characters and newlines. " END_OF_TEXT " indicates the end of the text. Output Print the number of W in the text. Sample Input computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the new era.
Provides an outstanding computer environment.
END_OF_TEXT Sample Output 3

Solution (Python):
s = input().lower()
n = 0
while True:
    q = []
    q = input().split()
    if q == ["END_OF_TEXT"]:
        break

    for i in q:
        i = i.lower()
        if s == i:
            n += 1
print(n)

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
s = raw_input()
s = s.lower().strip()
cnt = 0
while True:
	text = raw_input()
	if 'END_OF_TEXT' == text.strip():
		break
	text = text.lower()
	for item in text.split():
		if item == s:
			cnt += 1
print cnt

Solution (Python):
word = raw_input()
count = 0

while 1:
    line = raw_input()
    if line == "END_OF_TEXT":
        break
    for target in line.split(" "):
        if word.lower() == target.lower():
            count += 1

print(count)

Solution (Python):
W = str(raw_input().lower())

count = 0

while(1):
    T = map(str, raw_input().split())
    if T[0] == "END_OF_TEXT":
        break
    else:
        for i in range(len(T)):
            if W == T[i].lower():
                count += 1
print count

Solution (Python):
W = raw_input().lower()
T= []
while True:
    t = raw_input()
    if t == "END_OF_TEXT":
        break
    else:
        T += t.lower().split()
print(T.count(W))

Solution (Python):
import sys
w = input()
print(sys.stdin.read().lower().split().count(w))

Solution (Python):
word = input().lower()
count = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    words = line.lower().split()
    for w in words:
        if w == word:
            count += 1
print(count)

Solution (Python):
word = input()
counter = 0
while 1:
 s = input()
 if s == 'END_OF_TEXT':
  break
 else:
  s = list(s.lower().split())
  counter += s.count(word)
  counter += s.count(word + '.')

print(counter)

Solution (Python):
W = input()
a = []
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    a += [j.lower() for j in T.split()]
print(a.count(W))

Solution (Python):


W=input()
W=W.lower()

ct=0
while True:
    S=map(str,input().split())

    for i in S:
        if i=="END_OF_TEXT":
            print(ct)
            exit(0)
        elif i.lower()==W:
            ct=ct+1

Solution (Python):
w = input().lower()
cnt = 0
while True:
    str = input()
    s = str.split()
    if s[0] == "END_OF_TEXT":
        break
    else:
        for i in range(len(s)):
            if w == s[i].lower():
                cnt += 1
print(cnt)

Solution (Python):
target_word = raw_input()
text = ''
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.strip('.') + ' '

ans = 0
for word in text.lower().split():
    if word == target_word:
        ans += 1
print(ans)

Solution (Python):
target_word = raw_input()
text = ''
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.strip('.') + ' '


print(text.lower().split().count(target_word))

Solution (Python):
target_word = raw_input()
text = ''
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.strip('.') + ' '


print(text.lower().split().count(target_word))

Solution (Python):
target_word = raw_input()
text = ''
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.strip('.') + ' '


print(text.lower().split().count(target_word))

Solution (Python):
target_word = raw_input()
text = ''
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    
    text += raw + ' '


print(text.lower().split().count(target_word))

Solution (Python):
word = raw_input()
text = []
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.lower().split()

print(text.count(word))

Solution (Python):
word = raw_input()
text = []
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.lower().split()

print(text.count(word))

Solution (Python):
word = raw_input()
text = []
while True:
    raw = raw_input()
    if raw == "END_OF_TEXT":
        break
    text += raw.lower().split()

print(text.count(word))

Solution (Python):
if __name__ == '__main__':
    
    word = input()
    texts = []
    while True:
        raw_input = input()
        if raw_input == 'END_OF_TEXT':
            break
        texts.append(raw_input.lower())

    
    match_count = 0
    for line in texts:
        for w in line.split(' '):
            if w == word.lower():
                match_count += 1

    
    print(match_count)

Solution (Python):
w = input()
count = 0
while True:
    t = input()
    if t == "END_OF_TEXT": break
    for c in t.lower().split(' '):
        if c == w: count += 1
print(int(count))

Solution (Python):
T = ""
W = input().casefold()
while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    T += tmp + " "
print(sum([1 for c in T.split() if c.casefold() == W]))

Solution (Python):
W = input().lower()
T = ""
while True:
  inp = input().strip()
  if inp == 'END_OF_TEXT':
    break
  T += inp.strip().lower()+' '


print(T.split().count(W))

Solution (Python):
import sys
w=input().upper()
c=0
for s in sys.stdin:
    if "END_OF_TEXT" in s:
        break
    c += str(s).upper().split().count(w)
print(c)

Solution (Python):
s=input()
tex=[]
while 1:
	a=input()
	if a=="END_OF_TEXT":
		break
	else:
		tex.extend([x.lower() for x in a.split()])

c=0
tex

for i in tex:
	if i==s:
		c+=1

print(c)

Solution (Python):
w=input().lower()
c=[]
s=input()
while(s!='END_OF_TEXT'):
    c+=s.lower().split();
    s=input()
print(len([x for x in c if x==w]))

Solution (Python):

k_word = input()
count = 0

while True:
    s = input()
    
    if s == "END_OF_TEXT":
        break
    
    count += s.lower().split().count(k_word)

print(count)

Solution (Python):
w=raw_input()
W=w.lower()
Text=[]
while True:
    text=raw_input()
    if text=='END_OF_TEXT':
        break
    Text.extend(text.split())
for i in range(len(Text)):
    Text[i]=Text[i].lower()
print('%d'%Text.count(W))

Solution (Python):
w=input()
W=w.lower()
Text=[]
while True:
    text=input()
    if text=='END_OF_TEXT':
        break
    Text.extend(text.split())
for i in range(len(Text)):
    Text[i]=Text[i].lower()
print('%d'%Text.count(W))

Solution (Python):
import sys
W = input()
print(sum(line.lower().split().count(W) for line in sys.stdin.readlines()))

Solution (Python):
import sys
W = input().casefold()
print(sum(line.casefold().split().count(W) for line in sys.stdin.readlines()))

Solution (Python):
n = 0
w = input().lower()
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    l=line.lower().split()
    n += l.count(w)
print(n)

Solution (Python):
import sys
w = input().lower()
lines = sys.stdin.read()
line=lines[0:lines.find('END_OF_TEXT')].lower().split()
print(line.count(w))

Solution (Python):
word_count = 0
W = input().lower()
while True:
    try:
        T = input()
        if T == "END_OF_TEXT":
            break
    except EOFError:
        break
    for Ti in T.lower().split():
        if Ti == W:
            word_count += 1
print(word_count)

Solution (Python):


target = input().lower()
ans = 0

while True:
	ss = input()
	if ss == "END_OF_TEXT":
		break
	ans += len([x for x in ss.lower().split() if x == target])

print(ans)

Solution (Python):
import sys
w = input()
print(sys.stdin.read().rstrip('END_OF_TEXT').lower().split().count(w))

Solution (Python):
T = raw_input()
wordList = []

W = raw_input()
while(W!="END_OF_TEXT"):
    wordList.extend(W.split(" "))
    W = raw_input()

cnt = 0
for word in wordList:
    if(word.lower() == T.lower()):
        cnt += 1
print cnt

Solution (Python):
W = input().lower()
count = 0
while True:
    l = input()
    if l == 'END_OF_TEXT':
        break
    for i in l.lower().split():
        if i == W:
            count += 1
print(count)

Solution (Python):
import sys
W = input().lower()
print(sys.stdin.read().rstrip('END_OF_TEXT').lower().split().count(W))

Solution (Python):
'''
ITP-1_9-A
 ?????????????´¢
??????????????? W ??¨?????? T ????????????????????????T ??????????????? W ?????°???????????????????????°?????????????????????????????????
?????? T ????????????????????????????????????????????§????????????????????????????????? Ti ??¨???????????????????????? Ti ?????????????????? W ??¨??????????????????????????°??????????????????
???????????§????????¨?°???????????????\???????????????
???Constraints
W????????????????????????10????¶????????????????
T??????????????????????????????????????????1000????¶????????????????
???Input
?????????????????? W ????????????????????????
?¶???????????????°????????????????????£??????????????????????????????END_OF_TEXT ??¨??????????????????????????????????????????????????????
???Output
?????? W ?????°???????????????????????????
'''

checkString = input()
lineString = []
while True:
    searchString = input()
    
    if searchString == 'END_OF_TEXT':
        break
    searchString = (searchString.lower()).split()
    lineString.extend(searchString)


print(lineString.count(checkString))

Solution (Python):
import sys
lines = [line for line in sys.stdin]
W = lines[0].strip()
print(sum([1 for line in lines[1:] for w in line.split() if w.lower() == W]))

Solution (Python):
import sys

W = input().lower()
T = sys.stdin.read().lower()

print(T.split().count(W))

Solution (Python):
import sys

W = input().lower()
T = sys.stdin.read().lower()

print(T.split().count(W))

Solution (Python):
import sys


fin = sys.stdin

w = fin.readline()
w = w.rstrip('\n')
w = w.lower()

s = fin.read()
s = s.lower()
s = s.replace('\n', ' ')

s_list = s.split()
idx = 0
count = 0

for e in s_list:
	if w == e:
		count += 1

print(count)

Solution (Python):


import sys


def main():
    w = sys.stdin.readline().lower().strip('\n')
    s = 0

    for line in sys.stdin:
        if line == 'END_OF_TEXT':
            break
        s += line.lower().split().count(w)

    print(s)


if __name__ == '__main__':
    main()

Solution (Python):
W = input().lower()
count = 0
while True:
    a = input()
    if a == "END_OF_TEXT":
        break
    a = a.lower()
    a = a.split()
    for i in range(len(a)):
        if W == a[i]:
            count += 1          
print(count)

Solution (Python):
W = input().lower()

T = []
while True:
	R = input()
	if R == "END_OF_TEXT":
		break
	R = R + " "
	T.append(R)

T = (''.join(T)).lower()
T = T.split()
print(T.count(W))

Solution (Python):
W = input()
s = ""
while True:
    a = input()
    try:
        if a == "END_OF_TEXT":
            break
        else:
            s += a.lower()
            s += " "
    except:
        break

t = s.strip(".").split(" ")
print(t.count(W))

Solution (Python):
import sys
count = 0
w = ""
w = raw_input()
while 1 :
    adding = map(str,raw_input().split())
    for i in adding:
          if i == 'END_OF_TEXT':
              print count
              sys.exit()
          if i.lower() == w:
              count += 1

Solution (Python):
cnt = 0
s = input().lower()
while 1:
    line = input()
    if line == "END_OF_TEXT":
        break
    for w in line.lower().split():
        if w == s:
            cnt+=1
print(cnt)

Solution (Python):
str_search = input().upper()
int_cnt = 0
len_search = len(str_search)
while True:
    str_line = input()

    if str_line == "END_OF_TEXT":
        break
    
    str_line = str_line.upper()
    int_cnt = int_cnt + str_line.split().count(str_search)

print(str(int_cnt))

Solution (Python):
import re
W = input()
T = []
count = 0
while(1):
    line = input()
    if (line == "END_OF_TEXT"):
        break
    words = list(line.split())
    for word in words:
        T.append(word)
    
for word in T:
    matchOB = re.fullmatch(W, word.lower())
    if matchOB:
        count += 1

print(count)

Solution (Python):
import sys

w = input()
t = sys.stdin.read().lower().split()
print(t.count(w))

Solution (Python):
text = ''

key= input().lower()
while True:
    s = input()
    if s.find("END_OF_TEXT") >= 0: break
    try:
        text += s + ' '
    except:
        break

print([x.lower() for x in text.split(" ")].count(key) )

Solution (Python):
W = input().lower()

t=0

while(1):
	char_list = list(x for x in input().split())
	
	if char_list[0] == 'END_OF_TEXT':
		break
	
	for i in range(len(char_list)):
		if W == char_list[i].lower():
			t += 1

print(t)

Solution (Python):
count = 0
s = ""
array =[]
while True:
    count += 1
    if count == 1:
        s = input()
    n = input()
    if n == "END_OF_TEXT":
        break
    array.append(n)
count = 0
for i in range(len(array)):
    for i2 in array[i].split():
        if s.upper() == i2.upper() or s.lower() == i2.lower():
            count += 1
print(count)

Solution (Python):
W = input().strip().upper()
T = []
while True:
    t = input().strip().split()
    if t[0] == 'END_OF_TEXT':
        break
    else:
        for i in t:
            T.append(i.upper())

print(T.count(W))

Solution (Python):
wor = input().upper()
cou = 0

import re
while True :
    tes = input().split()
    if tes[0] == 'END_OF_TEXT': break
    tes = [temp.upper() for temp in tes]
    cou += tes.count(wor)

print(cou)

Solution (Python):
a=raw_input().lower()
c=0
while 1:
	b=raw_input()
	if b=='END_OF_TEXT':break
	for i in b.lower().split():
		if i==a:c+=1
print c

Solution (Python):
w = input().lower()
t = ""
while True:
    tmp = input()
    t += " "+tmp.lower()
    if tmp=="END_OF_TEXT":
        break
t=t.split()
print(t.count(w))

Solution (Python):
word = input()
text = []
count = 0

while True:
    line = input()
    if line=='END_OF_TEXT':
        break
    else:
        text.append(line.lower().split())


for i in text:
    for j in i:
        if j == word:
            count += 1

print(str(count))

Solution (Python):


import sys
import os


word = input().strip().lower()
c = 0
for s in sys.stdin:
    s = s.lower()
    for separated in s.split():
        if word == separated:
            c += 1
print(c)

Solution (Python):
key = input()
count = 0

while True:
    l = list(map(str, input().split()))
    l_lower = [ s.lower() for s in l]
    count += l_lower.count(key)
    if l[-1] == 'END_OF_TEXT':
        break

print(count)

Solution (Python):
word = input().lower()
count = 0
while 1:
    array = input().split()
    if array[0] == "END_OF_TEXT":
        break

    for a in array:
        if a.lower() == word:
            count += 1

print(count)

Solution (Python):



def func():
    try:
        word=input().rstrip().lower()
        words=[]
        while(True):
            line=input().rstrip()
            if(line == "END_OF_TEXT"):
                break
            else:
                words.extend(line.lower().split(" "))
    except:
        return inputError()

    print(words.count(word))
    

def inputError():
    print("input Error")
    return -1
 
func()

Solution (Python):
W = input().lower()
count = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    count += T.lower().split(" ").count(W)
print(count)

Solution (Python):


contents = []
counter = 0

word = input()

while True:
    text = input()
    if text == "END_OF_TEXT":
        break
    textWords = text.split()
    contents.append(textWords)

for x in contents:
    for y in x:
        if y.lower() == word:
            counter += 1

print(counter)

Solution (Python):
W=input().upper()
T=""
while True:
    Ti = input()+" "
    if Ti != "END_OF_TEXT ":
        T+= Ti.upper()
    else:
        break
TT=T.split(" ")
c=0
for t in TT:
    if t == W:
        c+=1
print(c)

Solution (Python):
count = 0
W = input().lower()
T = [0]
while True:
    try:
        if T[0] == "END_OF_TEXT":
            break
        for t in T:
            if W == t:
                count += 1
        T = [x.lower() for x in input().split()]
    except EOFError:
        break
    except IndexError:
        break
print(count)

Solution (Python):
from sys import stdin

w = input()

n = 0
for line in stdin:
    line = line.rstrip()

    if 'END_OF_TEXT' == line:
        break

    n += len(list(filter(lambda x: w.lower() == x.lower(), line.split(' '))))

print(n)

Solution (Python):
W = input().lower()
T=[]
t = input()
while t != "END_OF_TEXT":
 t = t.lower().split()
 T += t
 t = input()

print(T.count(W))

Solution (Python):
W = input()
T = input()
count = 0
while T != 'END_OF_TEXT':
    T = T.lower().split()
    count += T.count(W.lower())
    T = input()
print(count)

Solution (Python):


w = input().rstrip()

bun =[]
a =""
while a !="END_OF_TEXT":
    a = input().rstrip()
    if a =="END_OF_TEXT":
        break

    bun += a.lower().split()

print(bun.count(w))

Solution (Python):
W = input()
cnt = 0
while 1:
    line = input()
    if line == "END_OF_TEXT":
        break
    line = line.lower().split()
    for P in line:
        if P == W:
            cnt += 1
print(cnt)

Solution (Python):
import sys
W = input().lower()
cnt = 0
for line in sys.stdin:
    s = line.lower()
    T = s.split(" ")
    for i in range(len(T)):
        if T[i] == "end_of_text":
            break
        if T[i].strip("\".,\n") == W:
            cnt += 1
print(cnt)

Solution (Python):
from collections import Counter
W=input().lower()
count=0
while True:
    line=input().split()
    if line==["END_OF_TEXT"]:
        break
    count+=Counter(map(lambda x:x.lower(),line))[W]
print(count)

Solution (Python):
W = input()
cnt = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    
    T = list(T.lower().split())
    for S in T:
        if S == W:
            cnt += 1
print(cnt)

Solution (Python):
x=0
W=input()
S=""
while True:
    S=input()
    if S=="END_OF_TEXT":
        break
    S=S.lower().split()
    x+=S.count(W)
print(x)

Solution (Python):
from collections import Counter

word = input()
count = 0

while True:
    text = input()
    if text == 'END_OF_TEXT':
        break

    count += Counter(text.lower().split())[word.lower()]

print(count)

Solution (Python):


"""
?????????????´¢
"""
lower = "abcdefghijklmnopqrstuvwxyz"
upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

inp = input().strip()
w = inp.translate(str.maketrans(upper,lower))
s = ""
while True:
    inp = input().strip()
    if inp == "END_OF_TEXT":
        break
    s = s + " " + inp.translate(str.maketrans(upper,lower))
arr = s.split()
print(arr.count(w))

Solution (Python):
n=input()
count=0
while 1 :
    x=[i for i in input().split()]
    if x[0]=="END_OF_TEXT":
        break
    for i in range(len(x)):
        if x[i].lower()==n.lower():
            count=count+1
print(count)

Solution (Python):
w = input()
t = []
while True:
	temp = input()
	if temp == 'END_OF_TEXT':
		break
	else:
		t += [s.strip(',.') for s in temp.lower().split(' ')]

print(t.count(w))

Solution (Python):
def main():
    W = input()
    T = list(linein())

    w = W.lower()
    ans = 0
    for t in T:
        for word in t.split():
            if w == word.lower():
                ans += 1

    print(ans)

def linein():
    while True:
        try:
            s = input()
            if s == 'END_OF_TEXT':
                break
            yield ''.join(s)
        except EOFError:
            break

main()

Solution (Python):
n = 0
T=""
s= input().lower()
while True:
    t=input()
    T += t + " "
    if T.count("END_OF_TEXT")>0:
        break

TL = T.split(" ")

for i in TL:
    i = i.replace('"','')
    i= i.replace(".","")
    if i.lower() == str(s):
        n += 1
    else:
        pass
print (n)

Solution (Python):
W=input()

T=""
while True:
    line_sentence=input()
    if line_sentence=="END_OF_TEXT":
        break
    T+=" "+line_sentence.lower()

t=T.split()

cnt=0
for w in t:
    if w==W:
        cnt+=1

print(cnt)

Solution (Python):
w = input().upper()
ans = 0

while True:
  s = input()

  if s == "END_OF_TEXT":
    break

  s = s.upper().split()

  ans += s.count(w)

print(ans)

Solution (Python):
search_s = input()
cnt = 0
while True:
    s = input()
    if s == "END_OF_TEXT": break
    word_list = s.lower().split()
    for word in word_list:
        if word == search_s:cnt += 1

print(cnt)

Solution (Python):
W = input().lower()
T = []
while True:
    S = input()
    if S == "END_OF_TEXT":
        break
    T.extend([words.lower() for words in S.split()])
print(T.count(W))

Solution (Python):
W = input()
ls = []
count = 0
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    else:
        ls.append(list(map(str, text.split())))
for i in ls:
    for s in i:
        if s.lower() == W.lower():
            count += 1
print(count)

Solution (Python):
W = input()
ls = []
count = 0
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    else:
        ls = list(map(str, text.split()))
    for s in ls:
        if s.lower() == W.lower():
            count += 1
print(count)

Solution (Python):
W = input()
ls = []
count = 0
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    else:
        ls = list(map(str, text.split()))
    for s in ls:
        if s.lower() == W.lower():
            count += 1
print(count)

Solution (Python):
W=input()
count=0
while True:
    text=input()
    if text == 'END_OF_TEXT':
        break
    else:
        ls = list(map(str, text.split()))
    for s in ls:
        if s.lower() == W.lower():
            count += 1
print(count)

Solution (Python):
W=input()
s=0
while True:
 T=list(input().split())
 if T==['END_OF_TEXT']:
   break
 else:
   for i in T:
     if i.lower()==W.lower():
        s+=1
print(s)

Solution (Python):
W = input().lower()
T = ''
 
while True:
    txt = input()
    if txt == 'END_OF_TEXT': break
    T += txt.lower() + ' '
print(tuple(T.split(' ')).count(W))

Solution (Python):
search = raw_input().upper()
sentence = []
while 1:
    input_data = raw_input()
    if input_data == 'END_OF_TEXT':
        break   
    sentence += [s.upper() for s in input_data.split()]

ret = 0
for word in sentence:
    ret += 1 if word == search else 0
print ret

Solution (Python):
W = input()
counter = 0
T = []
while True:
    string = input()
    if string == "END_OF_TEXT":
        break
    else:
        T.append(string)
for i in range(len(T)):
    memo = T[i].split()
    for j in range(len(memo)):
        if memo[j].lower() == W:
            counter += 1
print(counter)

Solution (Python):


import sys, math, os


PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input2.txt", "rt")


word = input().strip().lower()
count = 0
while True:
    text = input().strip()
    if text == "END_OF_TEXT":
        break
    text = text.lower().split()
    count += text.count(word)
print(count)

Solution (Python):
import sys
w = input()
c = 0
for line in sys.stdin:
    if line == "END_OF_TEXT\n":
        break
    T = line.lower().split()
    c += T.count(w)
print(c)

Solution (Python):
W = input()
num = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    for word in line.split():
        if word.lower() == W.lower():
            num += 1
print(num)

Solution (Python):
a=0
b=input()
b=b.lower()
while True:
    z=list(map(str,input().split()))
    if z==['END_OF_TEXT']:
        break
    z=[str(i).lower() for i in z ]
    a+=z.count(b)
print(a)

Solution (Python):
count = 0
W = input().lower()
while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    count += T.lower().split().count(W)
print(count)

Solution (Python):
word = input()

string = input().lower()
last = ""

while last != "END_OF_TEXT":
	last = input()
	string += " " + last.lower()

list_words = list(string.split())

count = 0

for s in list_words:
	if s == word:
		count += 1

print(count)

Solution (Python):
cnt = 0

W = input()

while True:
    T = input().split()
    if T[0] == "END_OF_TEXT":
        break
    for word in T:
        if W.lower() == word.lower():
            cnt += 1

print(cnt)

Solution (Python):
w = input()
t = ""
while 1:
    try:
        t += input().lower()
        t += " "
    except EOFError:
        break
s = t.split()
count = 0
for i in s:
    if i == w:
        count += 1
print(count)

Solution (Python):
word = input().lower()
cnt = 0
while True:
    text = input()
    if text == "END_OF_TEXT": break
    text_list = list(text.split())
    for i in text_list:
        if i.lower() == word:
            cnt += 1
print(cnt)

Solution (Python):
import re

def reader():
    p = re.compile("^{}$".format(input()), re.I)
    yield 0
    while True:
        s = input()
        if s == "END_OF_TEXT":
            break
        for w in s.split():
            if p.match(w):
                yield 1

print(sum(reader()))

Solution (Python):
import re
c=0
s=''
p=input().upper()
ptn=re.compile(r'^'+p+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if re.match(ptn, i):
            c+=1
print(c)

Solution (Python):
import re
c=0
p=input().upper()
ptn=re.compile(r'^'+p+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if re.match(ptn, i):
            c+=1
print(c)

Solution (Python):
import re

c=0
p=input().upper()
ptn=re.compile(r'^'+p+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if re.match(ptn, i):
            c+=1
print(c)

Solution (Python):
import re

c=0
ptn=re.compile(r'^'+input().upper()+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if re.match(ptn, i):
            c+=1
print(c)

Solution (Python):
import re

c=0
p=re.compile(r'^'+input().upper()+r'$')

while True:
    s=input()
    if s =='END_OF_TEXT':
        break
    a=s.upper().split()
    for i in a:
        if re.match(p, i):
            c+=1
print(c)

Solution (Python):
word=input().lower()
how_in=0
while True:
    letters=input()
    if letters=='END_OF_TEXT':
        break
    for i in letters.lower().split():
        if i==word:
            how_in+=1
print(how_in)

Solution (Python):
word = input().lower()
text = []
c = 0
while True:
    read = input().split()
    if read[0] == 'END_OF_TEXT':
        break
    else:
        text.append(read)
for i in text:
    for n in i:
        if word == n.lower():
            c += 1
print(c)

Solution (Python):
word = input().lower()
texts = []
while True:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Solution (Python):
import sys
W = input()
print(((sys.stdin.read()).lower()).split().count(W))

Solution (Python):
W, c = input(), 0
for line in iter(input, 'END_OF_TEXT'):
    for Ti in  line.lower().split():
        if W == Ti:
            c +=1
print(c)

Solution (Python):
word = raw_input()
counter = 0
while True:
    line = raw_input()
    if line == "END_OF_TEXT":
        break
    counter += line.lower().split(" ").count(word)

print counter

Solution (Python):
w = input().lower()
text = ''
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    text += t.lower() + ' '
print(len([t for t in text.split(' ') if t == w]))

Solution (Python):
w = raw_input()

words = []
while True:
	line = raw_input()
	if line == "END_OF_TEXT":
		break
	else:
		line_list = line.split(" ")
		words += line_list


cnt = 0
for word in words:
	if w.lower() == word.lower():
		cnt += 1
print cnt

Solution (Python):
def main():

    target_word = str(input()).lower()
    texts_tuple = tuple()
    
    while True:
        text = input()
        if text == 'END_OF_TEXT': break
        texts_tuple += tuple(text.lower().split())
    
    print(texts_tuple.count(target_word))


main()

Solution (Python):
s=input().lower()
cnt=0
while True:
    l=input().split()
    if l[0]=='END_OF_TEXT': break
    for i in range(len(l)):
        lg=len(l[i])-1
        if not l[i][lg].isalpha(): l[i]=l[i][:lg]
        cnt+=(s==l[i].lower())
print(cnt)

Solution (Python):
key = input()

cnt = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break

    cnt += sum([key == word for word in line.lower().split()])

print(cnt)

Solution (Python):
w = input()
a = []
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.split()
    a.append(t)
ans = list(item.lower() for innerlist in a for item in innerlist)
print(ans.count(w))

Solution (Python):

w = str(input()).lower()
ans = 0
while(1):
	s = str(input())	
	if s == "END_OF_TEXT":
		break
	else:
		ans += sum([1 for x in s.split() if x.lower() == w])
		
print(ans)

Solution (Python):
W = input().lower()
wc = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
        
    for k in line.lower().split():
        if W == k:
            wc += 1

print(wc)

Solution (Python):
W=input().upper()
r=0
while 1:
  w=input()
  if w == 'END_OF_TEXT':break
  r+=len([x for x in w.upper().split() if x == W])
print(r)

Solution (Python):
import sys
W=input()
print(sys.stdin.read().lower().split().count(W))

Solution (Python):
import sys
w=input().upper()
print(sys.stdin.read().upper().split().count(w))

Solution (Python):
from sys import *
tt=input()
text=stdin.read().upper().split().count(tt.upper())
print(text)

Solution (Python):
import sys
a=input()
b=sys.stdin.read().upper().split().count(a.upper())
print(b)

Solution (Python):
import sys
a=input()
b=sys.stdin.read().upper().split().count(a.upper())
print(b)