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]
3 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]3 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
Create a security management policy that addresses the management and the separation of duties throughout the seven domains of a
klio [65]

Seven Domains of IT Infrastructure Seven domains can be found in a typical IT infrastructure. They are as follows: User Domain, Workstation Domain, LAN Domain, LAN-to-WAN Domain, Remote Access Domain, WAN Domain, and System/Application Domain.

Explanation:

User Domain : The User Domain covers all theusers (of any rank) that haveaccess to the other six domains.

RISKS:

  • User can destroy data in application(intentionally or not) and delete all
  • User can insert infected CD or USBflash drive into the work computer

Workstation Domain : A computer of an individual user where the production takes place

RISKS:

  • The workstation’s OS can have a known software vulnerability thatallows a hacker to connect remotelyand steal data.
  • A workstation’s hard drive can fail causing lost data

LAN Domain : Contains all of the workstations,hubs, switches, and routers. TheLAN is a trusted zone

RISKS:

  • A worm can spread through the LANand infect all computers in it.
  • LAN server OS can have a knownsoftware vulnerability.

WAN Domain : Stands for Wide Area Network and consists of the Internet and semi-private lines

RISKS:

  • Service provider can have a major network outage.
  • Server can receive a DOS or DDOS attack.
  • A FTP server can allow anonymously uploaded illegal software

LAN / WAN Domain : The boundary between the trusted and un-trusted zones.The zones are filtered with a firewall

RISKS:

  • Weak ingress/egress traffic filteringcan degrade performance.
  • A firewall with unnecessary portsopen can allow access from the Internet

System / Application Storage Domain : This domain is made up of user-accessed servers suchas email and database

RISKS:

  • A fire can destroy primary data
  • A DOS attack can cripple the organization’s email

Remote Access Domain  :The domain in which a mobileuser can access the local network remotely, usually through a VPN

RISKS:

  • Communication circuit outage candeny connection.
  • Remote communication from officecan be unsecured.
  • VPN tunneling between remotecomputer and ingress/egress routercan be hacked
6 0
3 years ago
_______ _____ is the process of creating usable computer pograms and applications and the theories behind those processes. Quest
stepladder [879]
<span>The correct answer is


C. Computer Science</span>
7 0
3 years ago
Read 2 more answers
David is selling his art work. He wants to figure out how much he should charge for each painting to make a 20 percent profit. H
VMariaS [17]

Answer:

create a spreadsheet that totals the cost and calculates 120 percent of the total cost

8 0
3 years ago
A Web _a___ is a software program that retrieves the page and displays it. Select one:
Ivahew [28]
The answer is station
4 0
4 years ago
The ________ coordinates the flow of data and information through the computer system by coordinating the hardware, software, us
Irina-Kira [14]

Answer:

Operating System.

Explanation:

All the properties listed in the question are handled by the Operating system.

Operating system:-It is a software that manages the computer hardware,provides common services for the programs of the computer and software resources.

Some of the most popular operating systems are as following:-

  1. Microsoft Windows.
  2. Apple MACOS
  3. Linux.

There are also other operating systems present out there these are some of the mostly used OS's.

8 0
3 years ago
Other questions:
  • What are some considerations when backing up data to the cloud?
    10·1 answer
  • If a security officer is non-commissioned officer, he can carry a baton on duty if he went through a training class
    8·1 answer
  • If a disk drive has 8 surfaces and there are 1024 tracks per surface with 256 sectors per track and 512 bytes/sector. What is th
    9·1 answer
  • What is the maximum data transfer rate of an ieee 1394a device?
    5·1 answer
  • How can you have a safe browsing experience
    5·1 answer
  • Which of the following statements is true of nonroutine messages? a. They typically concern novel events. b. They are best commu
    5·1 answer
  • Python
    5·1 answer
  • What are layers? Why would a layer be used?
    9·1 answer
  • What is typescript can you please give me a description of what it is
    13·1 answer
  • The temperature at 8 AM was 44°F and at noon it was 64°F. what was the percent of change from 8 AM to noon?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!