Tuesday, 6 November 2012

Find Vowel and Consonant via logical operator OR?


# Here is the Working of OR operator...


charr=raw_input('Enter An alphabet ')
if charr=='a' or charr=='A':
    print 'You enterd vowel',charr
elif charr=='e' or charr=='E':
    print 'You enterd vowel',charr
elif charr=='i' or charr=='I':
    print 'You enterd vowel',charr
elif charr=='o' or charr=='O':
    print 'You enterd vowel',charr
elif charr=='u' or charr=='U':
    print 'You enterd vowel',charr
else:
    print 'You Entered Consonant',charr

No comments:

Post a Comment