← Back to challenges

Char-to-ASCII

PythonMediumnumbersalgorithmsstrings

Instructions

Create a function that returns the ASCII value of the passed in character.

Examples

ctoa("A") ➞ 65

ctoa("m") ➞ 109

ctoa("[") ➞ 91

ctoa("\") ➞ 92
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Moving House