I am a newbie, please forgive my ignorance. I tried researching and reading other articles and questions, but nothing seems to give a proper answer.
If the answer is simply no, please just tell me.
Basically, I'm working on a project for school, and I want to be able to take someone's input (i.e. their name) and convert that to an integer. For example, If I input Rob, I want the output to show 18+15+2 (R=18, o=15, b=2), or 35. Something along those lines. Or, simply convert Rob to 35 and use that as a comparison in an if-else statement.
If there is more than one command, or set-up involved (such as converting the letters of the alphabet to integers before asking for input from the user) I would appreciate anyone just pointing me in the right direction for more information. I'm very excited to learn, and I understand this may be more complicated than I originally thought.
The only options I've found so far were the "hash" command, which did not give me the results I was looking for. From what I understand, that gives a random number to a word, but I could be misinterpreting the information.
The other thing I tried was the "ord()" command. However, that seems to only convert one letter at a time.
I apologize if this has been answered elsewhere, but I wasn't able to find anything that worked. I greatly appreciate anyone who takes time to try and help!
I am using Spyder (Python 3.9) if that matters.