65 90 97 120 String

count no capital letters

s=input()

t=len(s)

print(t)

print(s)

count=0

for i in s:

    if("A"<=i<="Z"):

        count=count+1

print(count) 


count number of capital in ascii values

s=input()

count=0

for i in s:

    t=ord(i)

    if(97<=t<=120):

        count=count+1

print(count)

vowel and consonant

s=input()

for t in s:

    if(t=='A' or t=='E'or t=='I'or t=='O'or t=='U'or t=='a' or t=='e'or t=='i'or t=='o'or t=='u'):

        print("vowel")

    else:

        print("cons")

palindrom or not

s = input()

print(s[::-1])

if(s==s[::-1]):

    print("palindrom")

else:

    print("not")

Comments

Popular posts from this blog

COCO FARMING MACHINE