Coding
Coding
print(l.count(e))
l=eval(input(""))
osum=0
for i in l:
if l[i]%2==1:
osum=osum+i
print(osum)
'''
l=eval(input(""))
k=len(l)
sum=0
for i in l:
sum=sum+i
m=sum/k
print(m)
'''def fun():
with open("hell.txt","r") as f:
st=f.read().split()
for w in st:
print(w)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read().split()
for w in st:
if w[0] in "aeiouAeiou":
print(w)
fun()
def count_char():
f=open("hell.txt","r")
c=0
st=f.read()
for ch in st:
c=c+1
print("total characters:",c)
f.close()
count_char()
def count_char():
f=open("hell.txt","r")
c=0
st=f.read()
for ch in st:
if ch in "aeiou":
c=c+1
print("total characters:",c)
f.close()
count_char()
def count_word():
f=open("hell.txt","r")
c=0
st=f.read().split()
for w in st:
c=c+1
print("total words:",c)
f.close()
count_word()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.lower() in "bcdefg":
c=c+1
print(c)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.isupper():
c=c+1
print(c)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.islower():
c=c+1
print(c)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.isdigit():
c=c+1
print(c)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.isalnum()==False:
c=c+1
print(c)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read()
c=0
for ch in st:
if ch.isspace():
c=c+1
print(c)
fun()
def count_word():
with open("hell.txt","r") as f:
c=0
st=f.read().split()
for w in st:
c=c+1
count_word()
def count_uniword():
with open("hell.txt","r") as f:
c=0
st=f.read().split()
for w in st:
if w.lower() in "the":
c=c+1
count_uniword()
def count_uniword():
with open("hell.txt","r") as f:
chis=0
cher=0
st=f.read().split()
for w in st:
if w.lower() == "his":
chis=chis+1
cher=cher+1
print("total her:",cher)
count_uniword()
def fun():
with open("hell.txt","r") as f:
st=f.read().split()
for w in st:
if w[-1] in "aA":
print(w)
fun()
def fun():
with open("hell.txt","r") as f:
st=f.read().split()
for w in st:
if len(w) > 3:
print(w)
fun()
def fun():
f1=open("hell.txt","r")
f2=open("upper.txt","a")
st=f1.read()
for ch in st:
if ch.isupper():
f2.write(ch)
f1.close()
f2.close()
fun()
def fun():
g=open("hell.txt","r")
st=g.read()
print(char)
g.close
fun()
def fun():
f=open("hell.txt","w")
f.writelines(l)
f.close()
fun()
def fun():
with open("hell.txt","r") as f:
k=f.readlines()
print(k)
fun()
import csv
def fun():
f=open("k.csv","w",newline="")
st=csv.writer(f)
for i in range(5):
st.writerow(rec)
f.close()
fun()
'''
import csv
def fun():
f=open("k.csv","r")
st=csv.reader(f)
for i in st:
if i[2]>'5':
print(i)
f.close()
fun()