Advertisement
simeonshopov

Vowels sum

Oct 2nd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. word = input()
  2. sum = 0
  3.  
  4. for i in word:
  5.   if i == "a":
  6.     sum += 1
  7.   elif i == "e":
  8.     sum += 2
  9.   elif i == "i":
  10.     sum += 3
  11.   elif i == "o":
  12.     sum += 4
  13.   elif i == "u":
  14.     sum += 5
  15.    
  16. print(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement