

Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
s=str(input("Nhap xau s: "))
d1=0
d2=0
d3=0
for i in s:
if (i>='a' and i<='z')or(i>='A' and i<='Z'):
d1=d1+1
if i>='0' and i<='9':
d2=d2+1
if i==' ':
d3=d3+1
print("So luong chu: ",d1)
print("So luong so: ",d2)
print("So luong khoang trang: ",d3)
Hãy giúp mọi người biết câu trả lời này thế nào?
s=str(input())
count=res=result=0
for i in s:
if i>='0' and i<='9':
count+=1
if (i>='A' and i<='Z') or (i>='a' and i<='z'):
res+=1
if i==' ':
result+=1
print('So:',count)
print('Chu:',res)
print('Khoang trang:',result)
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin