Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Created July 22, 2011 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxdna/1100426 to your computer and use it in GitHub Desktop.
Save tuxdna/1100426 to your computer and use it in GitHub Desktop.
Convert your name to Japanese
jmap = {
"A": "ka",
"B": "tu",
"C": "mi",
"D": "te",
"E": "ku",
"F": "lu",
"G": "ji",
"H": "ri",
"I": "ki",
"J": "zu",
"K": "me",
"L": "ta",
"M": "rin",
"N": "to",
"O": "mo",
"P": "no",
"Q": "ke",
"R": "shi",
"S": "ari",
"T": "chi",
"U": "do",
"V": "ru",
"W": "mei",
"X": "na",
"Y": "fu",
"Z": "zi"
}
name = raw_input("Name:")
l = []
for k in name.upper():
if k in jmap.keys():
l.append(jmap[k])
else:
l.append(k)
print "".join(l).title()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment