Home /
Expert Answers /
Computer Science /
python-nbsp-write-code-that-constructs-a-string-made-up-of-each-character-in-a-string-variable-name-pa299
(Solved): python Write code that constructs a string made up of each character in a string variable name ...
python
Write code that constructs a string made up of each character in a string variable named word repeated twice. For example, If mord contains 'Python', the resuling string wauld be 'Ppyytthhoonn'. Store the constructed string in a variable called double word. Assume that nord has aiready been initialized. 1. word = "box' 2 double_nord-" 3 for \( x \) in nord: 4 double_word \( 4(x+x) \) 5. print(double_nord) 6 Test Mesults: Voure using a variable named doubte.mord. \( \checkmark \) The constructed string is correct when the word is 'bex'. * The constructed string is not correct when the word is 'wander', \( x \) The constructed string is not correct when the word is 'tree'. \( x \) The details of this test are hidden. \( x \) The detalis of this test are hidden. \( 33 \% \) of tests passed.