""" File: Erin/alphabet.py Write the English alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxy A 65 B 66 C 67 D 68 E 69 F 70 ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',.. 'Y', 'Z'] """ def alphabet(): for i in range(65, 91): # 65 is ASCII for 'A' print(chr(i), end="") # prints on the same line print() def alphabet2(): for i in range(ord('a'), ord('z')): # alphabet in lower case print(chr(i), end="") # convert to character print() def findASCII(): for x in "ABCDEF": #find ASCII code for chars print(x,'\t', ord(x)) # prints on the same line print() def alphaList(): #alphabet in a list L = [chr(x) for x in range(65, 91)] print(L) def main(): alphabet() #alphabet alphabet2() findASCII() #prints ASCII code alphaList() main()