I'm looking to create a program where the user enters a word, then the program generates a random number that corresponds to a character in the word, not including the first or last letter of the word.
Ex: Entered word: Computer
generate random number between 1-6
Entered word: Phone
generate random number between 1-3
I'm not sure how to get it to exclude the first and last positions of the entered word. Any help would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire