Codeforces: A. String Task


The problem is from codeforces: http://www.codeforces.com/problemset/problem/118/A

118A Codeforces: A. String Task algorithms beginner codeforces implementation programming languages python string

Python is good at string manipulations. The problem is easy and the solution is straightforward. Just read the problem statement carefully… I didn’t do so that is why I failed the first submission because I think ‘Y’ is a consonant which is not.

v = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']
s = raw_input()

r = ''
for i in s:
    if any(i in y for y in v):
        pass
    else:
        r += '.'  + i.lower()

print r

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
171 words
Last Post: Codeforces: C. Cd and pwd commands
Next Post: Codeforces: A. Next Round

The Permanent URL is: Codeforces: A. String Task

Leave a Reply