Write a Python program that takes a String as input from the user, removes the characters at even index and prints the resulting String in uppercase without using the built-in function upper().
Sample Input 1:
String
Sample Output 1:
TIG
src = input()
res = ''
i = 0
shft = ord('a') - ord('A')
for ch in src:
if i%2 == 1:
ch_up = chr(ord(ch) - shft)
res += ch_up
i += 1
print(res)
Comments
Leave a comment