Question: Double Word Write code that constructs a string made up of each character in a string variable named word repeated twice. For example, if word

Double Word Write code that constructs a string made up of each character in a string variable named word repeated twice. For example, if word contains 'Python', the resulting string would be 'PPyytthhoonn'. Store the constructed string in a variable called double_word. Assume that word has already been initialized. 1 word = 'Python' 2 double_word = 3 for x in word: double_word += (x + x) 5 print (double_word) 4 Check My Solution Load My Latest Solution Reset Test Results: You're using a variable named double_word. The constructed string is not correct when the word is 'box'. The constructed string is not correct when the word is 'wander'. The constructed string is not correct when the word is 'tree'. The details of this test are hidden. The details of this test are hidden. 17% of tests passed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
