

Task

Given a character value in your language, print its code   (could be ASCII code, Unicode code, or whatever your language uses).



Example

The character   'a'   (lowercase letter A)   has a code of 97 in ASCII   (as well as Unicode, as ASCII forms the beginning of Unicode).

Conversely, given a code, print out the corresponding character.




var cps = []
for (c in ["a", "π", "字", "🐘"]) {
    var cp = c.codePoints[0]
    cps.add(cp)
    System.print("%(c) = %(cp)")
}
System.print()
for (i in cps) {
    var c = String.fromCodePoint(i)
    System.print("%(i) = %(c)")
}