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 amendment to the Constitution ended slavery in the United States?
KonstantinChe [14]
<span>The amendment to the constitution which ended slavery in the United States of America is the thirteen amendement. The correct option is B. The thirteen amendment forbades slavery and involuntary servitude in United States of America. The amendment was passed at the end of the civil war.</span>
4 0
3 years ago
In the layers toolbar, which layer will appear in front of your game
nekit [7.7K]
The top layer will appear.
5 0
3 years ago
Guys im getting the ps5 tomorrow :)​
Paha777 [63]

Answer:

lucky mf

Explanation:

5 0
2 years ago
Read 2 more answers
In Windows 7's Jump List, what can we do?
olga_2 [115]

Answer:se muestran los documentos recientes, la de iTunes muestra links para abrir la iTunes Store o reproducir toda nuestra colección, etc

Explanation:

4 0
2 years ago
To insert a new slide, which tab option should you select?
jek_recluse [69]

Ithink that the answer is C)

4 0
3 years ago
Read 2 more answers
Other questions:
  • If anybody knows what does this mean I will answer any questions for you and plz answer this right plz what does that envelope w
    5·2 answers
  • You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
    9·1 answer
  • How many of yall are willing too sub to my channel called "Space Juice" with around 200 subs?!​
    6·1 answer
  • What Is entered into the system as input?
    13·1 answer
  • Please help meeee , you will get 20 points
    9·2 answers
  • Adding Page Numbers in the Footer
    15·1 answer
  • Which user interface part shows graphical output of mined data?
    8·2 answers
  • 3) The director tells you to truck left, you must:
    10·1 answer
  • LAB: Phone number breakdown Given a long long integer representing a 10-digit phone number, output the area code, prefix, and li
    8·1 answer
  • the 4gl languages that enable nonprogrammers to use certain easily understood commands to search and generate reports from a dat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!