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
Andrews [41]
3 years ago
9

Your friend really likes talking about owls. Write a function owl_count that takes a block of text and counts how many words the

y say have word “owl” in them. Any word with “owl” in it should count, so “owls,” “owlette,” and “howl” should all count.
Here’s what an example run of your program might look like:

text = "I really like owls. Did you know that an owl's eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl."
owl_count(text)
# => 4
Hints

You will need to use the split method!


Here is what I have so far, it doesn not like count = 0 and i keep getting an error.
def owl_count(text):

count = 0

word = 'owl'

text = text.lower()

owlist = list(text.split())

count = text.count(word)


text = "I really like owls. Did you know that an owl's eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl."
print (count)
Computers and Technology
1 answer:
andriy [413]3 years ago
4 0
Text = “ I really like owls. Did you know that an owls eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl.

word = ‘owl’
texts = text.lower()
owlist = list(texts.split())
count = text.count(word)
num = [owlist, count] #num has no meaning just random var
print(num)


Alter in anyway you want so that you can succeed. ✌
You might be interested in
Which math operator is used to show multiplication in a spreadsheet formula
Anna11 [10]

Astrix (*) is used to multiply

Example: 5*5 (the answer would come out as 25)

If you’re using Excel, do it in the formula bar of course.

8 0
3 years ago
What are the best apps to learn coding
Soloha48 [4]
Khan Academy is a good website and also has an app
6 0
3 years ago
Read 2 more answers
2. Which the following may be a reason for giving a Page Quality (PQ) rating og Highest? Select all that apply (True or False)
Margaret [11]

The best answers are;

The website has an excellent reputation from experts

The page has extremely high quality content and the author is an acknowledged expert in the topic

You can earn a high to highest Page Quality rating through Google Search’s. This rating is given to webpages that satisfy their purpose extremely well. In order to receive a Page Quality rating of Highest, your webpage must contain at least one or more of the following characteristics;

  • The Main Content must have a satisfying amount of high quality pages.
  • The website must be an expert and authority source for the topic.
  • It must have a good reputation for the topic.
  • Your website must be well maintained and taken care of.

5 0
3 years ago
When you buy a ____ , you are loaning money to an organization
julsineya [31]
The answer is "bond".

8 0
3 years ago
Name any two basic type of operands<br><br> a. ___________<br><br> b. ___________
liraira [26]

Answer:  A) Constants

                B) Variable

Explanation: The two basic type of operands are-

A) Constants-

constants are the value that do not change once they are defined.

    As for example 5+3, here 5 and 3 are operands and + is an operator.

B) Variable-

It represents a symbolic variable name which helps in storing information in memory.

In A×B, A and B are two operands of variable type whose value can change and it is defined by user or some other dependent operation and × is a operator.  

7 0
3 years ago
Other questions:
  • A _____ is a link on a web page that leads to another web page.
    13·1 answer
  • Java: Literal representing the true value ? In java, what is the literal that represents a true value ?
    6·1 answer
  • Which of the following best meets the requirements of a strong password?
    5·2 answers
  • Samm1E49 ok my username is mosarider489 also if others want to join u can friend me
    8·2 answers
  • Number Array Class
    5·1 answer
  • 8. Which of the following could be measured by defining a goal in Google Analytics?
    13·1 answer
  • Pleasee helpppppppppppppppppppppp me!
    7·1 answer
  • Write a function called no_you_pick. no_you_pick should have two parameters. The first parameter is a dictionary where the keys
    5·1 answer
  • Select the best answer from the drop-down menu.
    14·2 answers
  • Write an if statement that assigns 0.2 to commission if sales is greater than or equal to 10000.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!