subject

Words are way more edgy when you replace the letter i with an exclamation point! Write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point. Your function should:

Convert the initial string to a list
Use a for loop to go through your list element by element
Whenever you see a lowercase i, replace it with an exclamation point in the list
Return the stringified version of the list when your for loop is finished
Here’s what an example run of your program might look like:

exclamations("I like music.")
# => I l!ke mus!c.
exclamations("Mississippi")
# => M!ss!ss!pp!

This is my code:
my_string = input("Enter text: ")
my_list = list(my_string)
for item in my_list:
if item == "i":
print ("!")
my_list. remove("i")
else:
print (item)
(" ").join(my_list)
it is not correctly printing:
it is suppose to be a string not up and down like this

Enter text: mississippi
m
!
s
!
s
!
p
!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Which is a false statement considering copyright law? a. when people upload something to the internet they automatically receive a copyright for the work b. the work does not have to contain a copyright notice to be considered having a copyright c. copyright is legal term describing rights given to the creators for literary and artistic works d. personal pictures are always covered by copyrights
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
This assignment continues work on the online booking facility introduced at the end of chapter- 10. the work will be continued in the assignments for chapters 14 and 15 (a) assume that you will produce your online booking facility using an agile approach. i. suggest the kind of user research you would like to conduct for your product before iteration cycles begin. ii prioritize the requirements for your product according to business value, i.e which requirements are likely to provide the greatest business benefit, and sketch out the ux design work you would expect to undertake during the first four iteration cycles, i.e. cycle 0, and cycles 1 to 3. (b) using one of the mockup tools introduced above, generate a mockup of your product's landing page, as developed in the assignment for chapter-11 (c) using one of the patterns websites listed previously, identify suitable interaction patterns for elements of your product, and develop a software-based prototype that incorporates all the feedback and the results of the user experience mapping achieved at the end of chapter-11. if you do not have experience in using any of these, create a few html web pages to represent the basic structure of your website
Answers: 2
question
Computers and Technology, 25.06.2019 06:30
During which stage do you think is the best time for a company to purchase an emerging technology
Answers: 1
question
Computers and Technology, 25.06.2019 07:00
How do the portrait and landscape page orientations in the process of printing a worksheet?
Answers: 1
You know the right answer?
Words are way more edgy when you replace the letter i with an exclamation point! Write the function...
Questions
question
Mathematics, 10.10.2019 19:30
question
English, 10.10.2019 19:30
Questions on the website: 13722363