Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
n=input()
list=[]
for ele in n:
list.append(ele)
list1=[]
for i in list:
list1.append(ord(i))
a=list1[0]
for j in list1:
if a<j:
a=j
large=a
b=list1[0]
for j in list1:
if b>j:
b=j
small=b
print(large+small)
werd
219
magicInput = input('Type here: ')
magicList = list(magicInput)
print(magicList)
Type here: hihelloooooojiidegrbdgnhryrjd
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-798aeda61b18> in <module>
1 magicInput = input('Type here: ')
----> 2 magicList = list(magicInput)
3 print(magicList)
TypeError: 'list' object is not callable
# Program to find the ASCII value of the given character
c = 'w'
print("The ASCII value of '" + c + "' is", ord(c))
The ASCII value of 'w' is 119
# Program to find the ASCII value of the given character
c = 'e'
print(ord(c))
101
# Program to find the ASCII value of the given character
c = 'r'
print("The ASCII value of '" + c + "' is", ord(c))
The ASCII value of 'r' is 114