Notification

No New notification

Learn to code with PrepInsta

Check PrepInsta Coding Blogs, Core CS, DSA etc

One Subscription, For Everyone

Get 200+ Courses under one Subscription

  • aptitude
  • aws_cloud
  • competitive-coding
  • dbms
  • logical_reasoning
  • operating-system
  • verbal
  • tcs_nqt
  • data_science
  • ethical_hacking
  • dsa
  • verbal
  • basic_coding
  • python
  • cpp
  • java
  • basic_coding
  • python
Explore PrepInsta Prime

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Problem 20

3 comments on “Problem 20”


  • Sreeja

    def charcounter(fname):
    linecount=0
    charcount=0
    with open(fname,’r’) as f:
    lines1=f.readlines()
    linecount=len(lines1)
    for i in lines1:
    for k in i:
    if k!=” ” or k!=”\n”:
    charcount+=1
    return linecount,charcount


  • Pallipattu

    Python
    n=input()
    a=0
    for i in n:
    if i.islower():
    a=a+1
    elif i.isupper():
    a=a+1
    else:
    if i.isdigit():
    a=a+1
    print(a)


  • Pallipattu

    n=input()
    a=0
    for i in n:
    if i.islower():
    a=a+1
    elif i.isupper():
    a=a+1
    else:
    if i.isdigit():
    a=a+1
    print(a)