1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natalka [10]
2 years ago
10

An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, AGH i

s an acronym for Alumni Guest House. Write a code snippet that allows a user to type in a phrase, and then outputs the acronym for that phrase. Even if the user doesn't enter the words in all caps, the acronym must be returned with all caps. You may find the methods .split(), .upper() and .lower() helpful, but make sure you test what they do!

Computers and Technology
1 answer:
gregori [183]2 years ago
7 0

Answer:

Here is the Python program:

#the method acronym that takes an argument phrase

def acronym(phrases):  

   acronym = ""  #to store acronym of a phrase

#loop to split the input phrase and return its acronym in upper case letters

   for phrase in phrases.split():  

       acronym = acronym + phrase[0].upper()

   return acronym

#main function that takes input phrase from user and display its acronym

def main():

   phrases = input("Enter a phrase: ")

   print("The acronym for your phrase is ",acronym(phrases))

main()

Explanation:

First let me explain the method acronym. This method takes a parameter phrase to return its corresponding acronym. First the phrase is split using split() method which is used to return the list of words in a phrase. For loop is used that will keep splitting the words in the string (phrase) entered by the user.

In this statement: acronym = acronym + phrase[0].upper()  the acronym is computed. phrase[0] means the first character of each word in the phrase which is found out by the split() method is converted to upper case by using upper() function and then stored in acronym variable. Each time the acronym is found and its first character is converted to upper case and added to the acronym variable.

Then the main() function prompts the user to enter a phrase and then calls the acronym function and passed that phrase as parameter to that function. Then the computed acronym for the phrase is printed on the screen.

You might be interested in
Which of the following statements is true of infrastructure?
bazaltina [42]

Answer:

Examples of infrastructure include transportation systems, communication networks, sewage, water, and electric systems. Projects related to infrastructure improvements may be funded publicly, privately, or through public-private partnerships.

3 0
2 years ago
a certain kind of fish in the ocean eats only algae. a seal eats this fish a bear eats the seal .when the bear dies,it’s recycle
STatiana [176]

Answer:seal

Explanation:

4 0
2 years ago
In Microsoft Word, when you highlight existing text you want to replace, you are in
kirill115 [55]
The correct answer is C. Typeover mode

This is when you select a text and can then type over it and it automatically replaces it with what you're writing. It also creates a little box that lets you edit the selected part easily if that's what you need with things like bold or italic or change the text color.
6 0
3 years ago
Compare the elements of the basic Software Development Life Cycle with 2 other models. How are they similar? How are they differ
Artemon [7]

Answer:

Explanation:

One of the basic notions of the software development process is SDLC models which stands for Software Development Life Cycle models. SDLC – is a continuous process, which starts from the moment, when it’s made a decision to launch the project, and it ends at the moment of its full remove from the exploitation. There is no one single SDLC model. They are divided into main groups, each with its features and weaknesses. The most used, popular and important SDLC models are given below:

1. Waterfall model

2. Iterative model

3. Spiral model

4. V-shaped model

5. Agile model

Stage 1. Planning and requirement analysis

Each software development life cycle model starts with the analysis, in which the stakeholders of the process discuss the requirements for the final product.

Stage 2. Designing project architecture

At the second phase of the software development life cycle, the developers are actually designing the architecture. All the different technical questions that may appear on this stage are discussed by all the stakeholders, including the customer.  

Stage 3. Development and programming

After the requirements approved, the process goes to the next stage – actual development. Programmers start here with the source code writing while keeping in mind previously defined requirements. The programming by itself assumes four stages

• Algorithm development

• Source code writing

• Compilation

• Testing and debugging

Stage 4. Testing

The testing phase includes the debugging process. All the code flaws missed during the development are detected here, documented, and passed back to the developers to fix.  

Stage 5. Deployment

When the program is finalized and has no critical issues – it is time to launch it for the end users.  

SDLC MODELS

Waterfall – is a cascade SDLC model, in which development process looks like the flow, moving step by step through the phases of analysis, projecting, realization, testing, implementation, and support. This SDLC model includes gradual execution of every stage completely. This process is strictly documented and predefined with features expected to every phase of this software development life cycle model.

ADVANTAGES  

Simple to use and understand

DISADVANTAGES

The software is ready only after the last stage is over

ADVANTAGES

Management simplicity thanks to its rigidity: every phase has a defined result and process review

DISADVANTAGES

High risks and uncertainty

Iterative SDLC Model

The Iterative SDLC model does not need the full list of requirements before the project starts. The development process may start with the requirements to the functional part, which can be expanded later.  

ADVANTAGES                                        

Some functions can be quickly be developed at the beginning of the development lifecycle

DISADVANTAGES

Iterative model requires more resources than the waterfall model

The paralleled development can be applied Constant management is required

Spiral SDLC Model

Spiral model – is SDLC model, which combines architecture and prototyping by stages. It is a combination of the Iterative and Waterfall SDLC models with the significant accent on the risk analysis.

4 0
2 years ago
What is the first step for creating a Pivot Table?
vlabodo [156]
To organize your data in a list of rows and coloums. (Table, Graph)
8 0
1 year ago
Other questions:
  • The maximum number of colors that should be used on a slide is _____. 2 4 6 8
    12·2 answers
  • According to Mintzberg's classification of managerial roles, the role of a(n) ______ is to transmit information received from ou
    7·1 answer
  • What are the conditions for using still photos in a video program
    6·1 answer
  • The application layer process that sends mail uses __________. When a client sends email, the client process connects with a ser
    10·1 answer
  • PLEASE HELP!! Kou converged his Word document to a PowerPoint document. When he received the PowerPoint, he was missing material
    12·1 answer
  • Maria is comparing her history project's second-place award to her classmate's first-place award. She starts planning how to win
    9·2 answers
  • What is the largest value that can be represented by 6 binary digits? .
    5·1 answer
  • Write a program that inputs numbers and keeps a
    8·1 answer
  • comparing the cost of care provided to medicare beneficiaries assigned to primary care nurse practitioners and physicians
    10·1 answer
  • 5 points)*list all of the data that needs to be kept track of for the scenario above in a 1nf (flat file) table (20 points)*use
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!