reverseString_V1

Run Settings
LanguagePython
Language Version
Run Command
# - **Question**: Write a function that takes a string and returns the string reversed. # Include error handling to manage cases where the input is not a string. # - **Example**: Input: `"hello"`, Output: `"olleh"`. # input = string # output = string # error handling def reverseString(input_string): return input_string[::-1] string_example1 = "hello" string_example2 = "Sauron" string_example3 = "12345" print(reverseString(string_example1)) print(reverseString(string_example2)) print(reverseString(string_example3))
Editor Settings
Theme
Key bindings
Full width
Lines