Question: Define a function reverse (word) that accepts a string, word, as its argument and returns a string with the characters in the opposite order
Define a function reverse (word) that accepts a string, word, as its argument and returns a string with the characters in the opposite order (e.g. reverse("abcd") would return "dcba"). Then, define a function string_length(word) that accepts a string, word, as its argument and returns the length of the string (again stick with for, if, else, etc and refrain from using the len() function).
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
def reversewordword reversedword for char in word reversedw... View full answer
Get step-by-step solutions from verified subject matter experts
