I converted my C code into Python, but keep getting this error: ValueError: invalid literal for int() with base 10.
This is what my terminal is returning:
$ python caesar.py 3
hello
Traceback (most recent call last):
File "caesar.py", line 24, in <module>
userMessage[i] = (((int(userMessage[i]) - ord('a')) + key) % 26) + ord('a')
ValueError: invalid literal for int() with base 10: 'h'
What am I doing wrong? Is it the int() or the ord() or both?
I appreciate the help, guys. Thanks.