- Continuously ask a user the following in the shell “Enter a long word: “. Whatever the user enters, use for loop to print each letter per line. If the user enters “exit” stop the loop. For example
-
Enter a long word: phoenix
p
h
o
e
n
i
x
Enter a long word: dragon
d
r
a
g
o
n
Enter a long word: exit
Bye bye.
- The following codes will replace 2nd “?” with letter “a”.
-
clues = ["?","?,"?","?","?","?"]
print(clues)
clues[1] = "r"
print(clues)
- Now change the code above so it will replace the first “?” with letter “d” and third “?” with letter “a”