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 of these files, when included in a program, will provide user assistance?
34kurt

Answer:

Answer for this question is D

Explanation:

Help flies

4 0
3 years ago
Read 2 more answers
A(n) __________ DHCPv6 server relies on router advertisements to give some information to individual hosts, making small changes
vodomira [7]

Answer:

Stateless

Explanation:

According to my experience in the field of information technology and networking, I can say that the type of server being mentioned is a Stateless DHCPv6 server. This is a server that provides some information to individual hosts within the network, but does not make any address assignments to the individual devices. Like mentioned in the question.

8 0
3 years ago
In a linked chain implementation of a queue, the performance of the enqueue operation
alexdok [17]

Answer:

A.O(1)

Explanation:

In the implementation of queue by using linked chain the performance of  the enqueue operation is O(1).We have to  maintain  two pointers one  head and the other tailand  for  enqueue operation  we have to insert element  to the next of the tail and then  make that element  tail.Which takes O(1) time.

4 0
3 years ago
Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
nataly862011 [7]

Complete Question:

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is:

Enter a number (<100):

Enter a number (<100):

Enter a number (<100):

Your number < 100 is: 25

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int n;

       do{

           System.out.println("Enter a number (<100):");

           n= in.nextInt();

       }while(n>100);

       System.out.println("Your number < 100 is: "+n);

   }

}

Explanation:

Using Java programming language

Import the scanner class to receive user input

create an int variable (n) to hold the entered value

create a do while loop that continuously prompts the user to enter a number less than 100

the condition is while(n>100) It should continue the loop (prompting the user) until a number less than 100 is entered.

4 0
3 years ago
Read 2 more answers
What are the main advantages of a solid-state drive (SSD) over a conventional hard disk drive (HDD)? (Choose three)
Masja [62]

Answer:

The benefits of SSDs over HDDs include:

Faster read/write speeds. SSDs can access large files quickly.

Quicker boot times and better performance. Because the drive does not need to spin up as an HDD would, it is more responsive and provides better load performance.

Durability. ...

Power consumption. ...

Quieter. ...

Size.

Explanation:

4 0
2 years ago
Other questions:
  • What is ‘validation’?
    5·1 answer
  • Which of the following is a category of social media?
    8·2 answers
  • Which hexadecimal-type address refers to a physical networking device such as a network interface card?
    10·1 answer
  • While speech recognition can operate without any confi guration, you can train it to more accurately recognize your voice. true
    5·1 answer
  • How do entrepreneurs traditionally use computers? check all of the boxes that apply.​
    13·2 answers
  • Will give brainliest!!!!!!!!
    15·2 answers
  • Indicate if the statement is true or false False 1. A spreadsheet cannot recalculate after you have changed data in your workshe
    15·1 answer
  • 1.What is the output of the following program? [10 Marks]namespace ConsoleApp1{class Program{static void Main(string[] args){int
    13·1 answer
  • Look at the code in the example below, and then answer the question.
    9·1 answer
  • When advertising on search engines, if you bid the same as your competitor, having a higher quality score will mean you appear w
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!