3.8 & 3.10 Hacks
words = ["alfa", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india", "juliett", "kilo",
"lima", "mike", "november", "oscar", "papa", "quebec", "romeo", "sierra", "tango", "uniform", "victor", "whiskey", "xray", "yankee", "zulu"]
inp = input().lower()
out = ""
for letter in inp:
for word in words:
if letter == word[0]:
out += word + " "
print("input:" + " " + inp + "\n" + "NATO phonetic alphabet:" + " " + out)
keypad = [[1, 2, 3], # i represents the row
[4, 5, 6], # j represents the columns
[7, 8, 9],
[" ", 0, " "]]
matrix = 0
while matrix < len(keypad):
print(*keypad[matrix])
matrix = matrix + 1
Print what month you were born and how old you are by iterating through the keyboard (don't just write a string).
keyboard = [["`", 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "-", "="],
["Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]"],
["A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "'"],
["Z", "X", "C", "V", "B", "N", "M", ",", ".", "/"]]
print("Birthdate:" + " " + keyboard[2][2] + keyboard[1][2] + keyboard[3][2] + keyboard[1][2] + keyboard[3][6] + keyboard[3][4] + keyboard[1][2] + keyboard[1][3] + " " + str(keyboard[0][1]) + str(keyboard[0][2]), end=" ")
print("\n" + "Age:" + " " + str(keyboard[0][1]) + str(keyboard[0][7]), end=" ")