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
olga nikolaevna [1]
3 years ago
14

python An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase an

d 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:
Computers and Technology
2 answers:
bagirrra123 [75]3 years ago
7 0

Answer:

text = input("enter text: ")

print(text)

acronym = ''

for c in text:

   if c.isupper():

       acronym += c

       

list(acronym)        

print('.'.join(acronym))

Explanation:

The code above takes an input phrase, an empty string string "acronym"  is created to hold the the acronym.

A FOR loop is used with an IF statement to check if any of the characters begin with an uppercase letter and adds it to the acronym string.

The acronym string is converted to a list so that each letter can be recombined using a dot(.) and finally the acronym is printed to the screen.

Basile [38]3 years ago
4 0

Answer:

Explanation:

I

You might be interested in
Select the best answer that completes the following sentences. Wireless technology changed the workday to
Minchanka [31]

Answer: around the clock availability

Explanation: i got 100

6 0
3 years ago
Read 2 more answers
What command would you use to map a share to a drive letter on a computer?
natulia [17]
What are the options
4 0
4 years ago
Implement the function fileSum. fileSum is passed in a name of a file. This function should open the file, sum all of the intege
maria [59]

Answer:

/*C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program */

//header files

#include <fstream>

#include<string>

#include <iostream>

#include <cstdlib> //needed for exit function

using namespace std;

//function prototype

int fileSum(string filename);

int main()

{

string filename;

cout << "Enter the name of the input file: ";

cin >> filename;

cout << "Sum: " << fileSum(filename) << endl;

system("pause");

return 0;

}

/*The function fileSum that takes the string filename and

count the sum of the values and returns the sum of the values*/

int fileSum(string filename)

{

//Create a ifstream object

ifstream fin;

//Open a file

fin.open(filename);

//Initialize sum to zero

int sum=0;

//Check if file exist

if(!fin)

{

cout<<"File does not exist ."<<endl;

system("pause");

exit(1);

}

else

{

int value;

//read file until end of file exist

while(fin>>value)

{

sum+=value;

}

}

return sum;

}//end of the fileSum

Explanation:

This is a C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program.

Check attachment for sample output screenshot.

5 0
3 years ago
Why is cyberbullying so devastating to many people beyond just the victim?
Lynna [10]

Answer: If the situation goes undetected, it can lead to serious situations, self-harm, and damaged relationships. According to Superintendent Alex Geordan, some common long-term effects of cyberbullying include depression, low self-esteem, unhealthy addictions, trust issues, and poor mental health.

6 0
3 years ago
_____ laws protect intellectual property.
loris [4]
Copyright laws protect intellectual property.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Please reply only in CORAL. I am not sure how to get the numbers between the negative version and positive version of the input
    10·1 answer
  • Which describes the purpose of the continue statement in Java?
    5·1 answer
  • (a) Write a SCHEME function (make-change n den) which outputs a list of change specifications. Namely, a call (make-change 11 (l
    8·1 answer
  • In Java please.
    13·1 answer
  • The site is not allowing me to purchase the subscription. Please help?
    12·1 answer
  • Which method of traversing a tree would result in a sorted list for a binary search tree?
    11·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • Universal Containers sells its products online using a system built on Force Sites. The orders are captured and processed in Sal
    7·1 answer
  • What is 3x10? PLZZZZZ
    11·1 answer
  • Hurry please I’ll give Brainliest if you are right
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!