simeonshopov

Sum of chars

Nov 25th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. n = int(input())
  2. sum = 0
  3.  
  4. for i in range(n):
  5.   char = input()
  6.   sum += ord(char)
  7.  
  8. print(f'The sum equals: {sum}')
Advertisement
Add Comment
Please, Sign In to add comment