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
Nataly_w [17]
2 years ago
5

Write a function analyze_text that receives a string as input. Your function should count the number of alphabetic characters (a

through z, or A through Z) in the text and also keep track of how many are the letter 'e' (upper or lowercase). Your function should return an analysis of the text in the form of a string phrased exactly like this: "The text contains 240 alphabetic characters, of which 105 (43.75%) are ‘e’."
Using function
Computers and Technology
1 answer:
laiz [17]2 years ago
5 0

Answer:

def analyze_text(sentence):

   count = 0

   e_count = 0

   for s in sentence:

       s = s.lower()

       if s.isalpha():

           count += 1

       if s == "e":

           e_count += 1

   return "The text contains " + str(count) + " alphabetic characters, of which " + str(e_count) + " (" + str(e_count*100/count) + "%) are ‘e’."

Explanation:

Create a function called analyze_text takes a string, sentence

Initialize the count and e_count variables as 0

Create a for loop that iterates through the sentence

Inside the loop, convert all letters to lowercase using lower() function. Check each character. If a character is a letter, increment the count by 1. If a character is "e", increment the e_count by 1.

Return the count and e_count in required format

You might be interested in
Several NEC® sections contain the requirement to size conductors and overcurrent devices at 100 percent of the noncontinuous loa
9966 [12]

Answer:

125 percent of continuous load

Explanation:

8 0
2 years ago
Can someone please help me write a code for this
Anon25 [30]
When in doubt, decompose (break into smaller parts) the problem!

You need to display a GUI.
You need to accept input from two widgets and convert it integers.
You need to add a range of numbers.
You need to concatenate a string of what you're doing with the addition.
You need to display an answer in a widget and maybe redraw the window.

I've been having success copying the assignment into my source file and decomposing it as comments to frame out my program.
5 0
3 years ago
When defining a system
Sveta_85 [38]

All of the given answer options are necessary to operate the enterprise resource planning (ERP) system when defining a system  landscape.

Enterprise resource planning (ERP) can be defined as a business strategy process through which business firms manage and integrate the main parts of their day-to-day business activities by using software applications.

The main objective and purpose of an enterprise resource planning (ERP) system is to significantly reduce costs by integrating all the operations of a business firm.

In Computer science, when defining a system  landscape, all of the following are necessary to operate the enterprise resource planning (ERP) system:

  • Technical expertise
  • Computer hardware
  • Networking hardware

Read more on ERP system here: brainly.com/question/25752641

7 0
2 years ago
We learned that an ideal multiple access protocol has FOUR desirable
Nataly [62]

Answer:

We learned that an ideal multiple access protocol has FOUR desirable

characteristics, describe them.

Explanation:

1.- Very experienced technology and easy to implement.

2.- Rigid resource management and unfit for variable traffic flows.

3.- Requires antenna duplexer for duplex transmission.

<u>Duplex</u> <em>is a term used in telecommunication to define a system that is capable of maintaining two-way communication, sending and receiving messages simultaneously. </em>

4.- Normally FDMA is combined with multiplexing FDD.

<u>FDMA</u> (acronym in English for Frequency Division Multiple Access) <em>is a multiplexing technique used in multiple communication protocols, both digital and analog, mainly radio frequency, and among them in mobile phones of GSM networks. </em>

<u>FDD</u> (Frequency Division Duplexing in English) <em>designates a duplex method in the environment of wireless telecommunications and over certain wired networks.</em>

4 0
3 years ago
I Previous
Tcecarenko [31]

Answer:

D. Change the def to def area (width, height = 12)

Explanation:

Required

Update the function to set height to 12 when height is not passed

To do this, we simply update the def function to:

def area (width, height = 12)

So:

In boxlarea = area (5,2), the area will be calculated as:

area = 5 * 2 = 10

In box2area = area (6), where height is not passed, the area will be calculated as:

area = 6 * 12 = 72

5 0
2 years ago
Other questions:
  • When desktop publishing software can interact with another software program, the two are said to
    6·1 answer
  • What are a few benefits of virtualization?<br> How do they benefit ?
    9·1 answer
  • This is a free point thing!! I am giving 100 points!! Anyone wanna talk!!!!
    11·2 answers
  • Some people are unable to arrange six matches to form four equilateral triangles because they fail to consider a three - dimensi
    6·1 answer
  • Plz help ASAP
    10·1 answer
  • Which network component is used to connect one network to another? Which component delivers the message to the destination compu
    5·1 answer
  • If you face an investigation where dangerous substances might be around, you may need to obtain which of the following?
    13·2 answers
  • The auxiliary device used to store large volume of data and program for future is called​
    10·1 answer
  • You want to draw a rectangle over the moon you added to your slide and then move it behind the moon. You want it to look like a
    15·1 answer
  • ______________ are used to store information that will be referenced and manipulated in a computer program. They label data with
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!