Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with Python code I'm stuck on! I think I need to use the text.split() and maybe a for loop like for index,

Need help with Python code I'm stuck on!

image text in transcribed

I think I need to use the text.split() and maybe a for loop like " for index, value in enumerate(my_list): " but I'm just not sure how to go about this one and it's the first time we are using enumerate and split with lists. Thank you for any help you can provide!

Exercise 7.3.7: Owls 5 points Your friend really likes talking about owls. Write a function owl_count that takes a block of text and counts how many words they 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 twic e 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? Somet imes I wish I could be an owl." owl_count(text) # => 4 Hints You will need to use the split method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

Prove that the series converges uniformly in the indicated region.

Answered: 1 week ago