Hristomir

sum_char

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