← Back to Strings
Question 24
Double Every Letter
Double Every Letter
Read one word and build a new string in which every character appears twice in a row, by starting from an empty result and adding each character to it twice inside a for loop, then print the built string on one line. Input: one line, the word, no prompt.
Expected Output:
hheeyy= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.