Question

6.8 LAB: Acronyms ( PYTHON PLEASE ) An acronym is a word formed from the initial...

6.8 LAB: Acronyms ( PYTHON PLEASE )

An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.

Ex: If the input is:

Institute of Electrical and Electronics Engineers

the output is:

IEEE
0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

# read string

input_string = input()

# acronym

acronym = ""

# iterate over string

for char in input_string:

    # if capital

    if char.isupper():

        acronym += char

# print

print(acronym)

.

Screenchot:

Output:

.

Add a comment
Know the answer?
Add Answer to:
6.8 LAB: Acronyms ( PYTHON PLEASE ) An acronym is a word formed from the initial...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT