#phoneDial.py #Telephone dial: input letter, output corresponding digit on dial c = input("Enter a telephone dial letter: ") if c=='A' or c=='B' or c=='C': print("2 corresponds to ", c, " on the phone") elif c=='D' or c=='E' or c=='F': print("3 corresponds to ", c, " on the phone") elif c=='G' or c=='H' or c=='I': print("4 corresponds to ", c, " on the phone") elif c=='J' or c=='K' or c=='L': print("5 corresponds to ", c, " on the phone") elif c=='M' or c=='N' or c=='O': print("6 corresponds to ", c, " on the phone") elif c=='P' or c=='R' or c=='S': print("7 corresponds to ", c, " on the phone") elif c=='Y' or c=='U' or c=='V': print("8 corresponds to ", c, " on the phone") elif c=='W' or c=='X' or c=='Y': print("9 corresponds to ", c, " on the phone") elif c=='Q' or c=='Z': #pretend it's an old phone dial... print("No digit corresponds to ", c, " on the phone") #method returns true if string is a lowercase letter elif c.islower(): print("Uppercase letters only please") else: #not A-Z, not a-z, so must be a digit or punctuation print("Letters only please") #try to minimize your typing/time