Question: E8. Use a for-loop and range to print out each letter of a word stored in a variable named word, with each letter on a


E8. Use a for-loop and range to print out each letter of a word stored in a variable named word, with each letter on a separate line. To make your code as general as possible, use the syntax range(len (word)) so that your code works with words of any length. [ word=0 for E9. Repeat the above process, but this time use the "for-each" syntax of a for-loop to print each letter of word on a separate line. That is, your code will need to contain the syntax for w in word somewhere. + ftis + [] E12. Use the enumerate function and a for-loop to print each uppercase letter, along with its position in the alphabet, each on a separate line. Your output should resemble the following: A1 B2 C3 2 26 import string # use string.ascii_uppercase to access the uppercase letters in alphabetical order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
