The variable word references the string winter. Use for loops to create new strings with various text
Fantastic news! We've Found the answer you've been seeking!
Question:
The variable word references the string ‘winter’. Use for loops to create new strings with various text effects as follows.
Variable long_word becomes ‘wwwiiinnnttteeerrr’
Variable crossed_word becomes ‘XwXiXnXtXeXr’
word = 'winter'
long_word = ''
# write the for loop that traverses word to create
# long_word with value 'wwwiiinnnttteeerrr'
crossed_word = ''
# write the for loop that traverses word to create
# crossed_word with value 'XwXiXnXtXeXr'
print(long_word)
print(crossed_word)
Related Book For
Posted Date: