fork download
  1. def demso(s):
  2. so=0
  3. for i in range(0,len(s)):
  4. if (s[i]<='9' and s[i]>='0'):
  5. so+=1
  6. return so
  7.  
  8. def demchu(s):
  9. chu=0
  10. for i in range(0,len(s)):
  11. if (s[i]<='z' and s[i]>='a') or (s[i]<='Z' and s[i]>='A'):
  12. chu+=1
  13. return chu
  14.  
  15. s = input()
  16. print("So chu cai: "+str(demchu(s)))
  17. print("So chu so: "+str(demso(s)))
  18.  
Runtime error #stdin #stdout #stderr 0.02s 27704KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 15, in <module>
    s = input()
EOFError: EOF when reading a line