Question

In: Other

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

Solutions

Expert Solution

# 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:

.


Related Solutions

Scrambled Word Game (Python) Topics: List, tuple In this lab, you will write a scrambled word...
Scrambled Word Game (Python) Topics: List, tuple In this lab, you will write a scrambled word game. The game starts by loading a file containing scrambled word-answer pair separated. Sample of the file content is shown below. Once the pairs are loaded, it randomly pick a scrambled word and have the player guess it. The number of guesses is unlimited. When the user guess the correct answer, it asks the user if he/she wants another scrambled word. bta:bat gstoh:ghost entsrom:monster...
In Java Please!!! 6.22 LAB: Python and sqlite basics Write a Python program that connects to...
In Java Please!!! 6.22 LAB: Python and sqlite basics Write a Python program that connects to a sqlite database. Create a table called Horses with the following fields: id (integer): a primary key and not null name (text) breed (text) height (real) birthday (text) Next, insert the following data row into the Horses table: id: 1 name: 'Babe' breed: 'Quarter Horse' height: 15.3 birthday: '2015-02-10' Output all records from the Horses table. Ex: With the above row inserted, the output...
write a python program that reads a sentence and identifies a word from an existing glossary...
write a python program that reads a sentence and identifies a word from an existing glossary and states the meaning of the word
8.30 LAB*: Program: Authoring assistant. PYTHON PLEASE!! (1) Prompt the user to enter a string of...
8.30 LAB*: Program: Authoring assistant. PYTHON PLEASE!! (1) Prompt the user to enter a string of their choosing. Store the text in a string. Output the string. (1 pt) Ex: Enter a sample text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes; more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue! You entered: we'll continue our quest in space. there will be...
PYTHON please provide the complete function definition, full docstring with at least two examples A word...
PYTHON please provide the complete function definition, full docstring with at least two examples A word is a palindrome if it the same read forwards and backwards. We will call a word a fuzzy palindrome if it is the same read forwards and backwards, except for possible differences in case. For example, both 'tattarrattat' and 'TaTtArRAttat' are fuzzy palindromes. Define a function is_fuzzy_palindrome that returns True if and only if its argument is a fuzzy palindrome.
Perform a sentiment analysis of a big text file in python Extract each word from the...
Perform a sentiment analysis of a big text file in python Extract each word from the file, transform the words to lower case, and remove special characters from the words using code similar to the following line:w=w.replace(':','').replace('?','').replace(',','').replace('.','').replace('"','').replace('!','').replace('(','').replace(')','').replace('\'','').replace('\\','').replace('/','') Utilize the lists of positive words, found in positive.txt to perform a sentiment analysis on the file (count how many positive words there are in a file) positive.txt crisp crisper cure cure-all cushy cute cuteness danke danken daring ... file.txt ...has a new...
In python Using the example code from the HangMan program in our textbook, create a Word...
In python Using the example code from the HangMan program in our textbook, create a Word Guessing Game of your choice. Design a guessing game of your own creation. Choose a theme and build your words around that theme. Keep it simple. Note: I would highly recommend closely reviewing the HangMan code and program from Chapter 10 before starting work on this project. You can run the program via my REPL (Links to an external site.). Using python Similar to...
a)     How many four-letter words can be formed from the letters of the word LAUNDRY if each...
a)     How many four-letter words can be formed from the letters of the word LAUNDRY if each letter can only be used one time in a word? Y is NOT considered a vowel in this word. b)    How many contain the letter Y? c)     How many contain both vowels? d)    How many of them contain exactly three consonants? e)    How many of them begin and end in a consonant? f)      How many begin with N and end in a vowel? g)     How many begin with N and...
Without plagiarism or copying word for word from the internet. Please write at least two strong...
Without plagiarism or copying word for word from the internet. Please write at least two strong paragraphs in response to the prompt below. Each paragraph should be 8-12 sentence for a total of 300-550 words. Use lots of examples. Describe/explain/summarize a mental health issue that you are familiar with and one that you would like to know more about.
Please answer using python 3 and def functions! Lab 2 Drill 3: (function practice) create and...
Please answer using python 3 and def functions! Lab 2 Drill 3: (function practice) create and use a function named highest() that takes three inputs and returns the highest number. After you have got it working, try calling the function with inputs ‘hat’, ‘cat’, ‘rat’.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT