Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = input()
- sum = 0
- for char in text:
- if char == 'a':
- sum += 1
- elif char == 'e':
- sum += 2
- elif char == 'i':
- sum += 3
- elif char == 'o':
- sum += 4
- elif char == 'u':
- sum += 5
- print(sum)
- ИЛИ:
- vowels = 'aeiou'
- text = input()
- sum = 0
- for char in text:
- if char in vowels:
- sum += vowels.index(char) + 1
- print(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement