Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Test all functions and programs before submitting them-make sure that they work

ID: 3570071 • Letter: T

Question

Test all functions and programs before submitting them-make sure that they work as desired! 14. (13%) Write a program that shall ask the user to enter words, one at a time. The word 'stop' (less the quotes, case-insensitive) shall terminate the input. The program then shall print all entered words in the reverse order, each on a separate line and capitalized. Example: Enter a word: HELLO Enter a word: world Enter a word: goodbye Enter a word: Stop Goodbye World Hello (12%) Define function abbreviate(text) that shall return a string of the first letters of every word in the string text, convened to uppercase and each followed by a period. Write a test program that shall ask the user to input a text and print its abbreviation. Example: Enter some text: Sawyer business school S.B.S.

Explanation / Answer

while True:
person = input('Enter a word ')
if person == "stop":
break
print "GoodBye World Hello"

def abbreviate(s):
words = s.split(" ")
abr = ""
for word in words :
abbr = abr + "." + word[0].toUpperCase
print abr

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote