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
alisha [4.7K]
3 years ago
12

Write a function all_cats that consumes a comma-separated string of animals and prints whether all of the animals have "cat" in

their name. For example, the string "gerbil,catfish,dog,cat" would return False, but just "cat,catfish" would return True. If the function consumes an empty string, then it returns True. Call this function on a string of animals of your choice and print the result.

Computers and Technology
1 answer:
RoseWind [281]3 years ago
8 0

Answer:

  • Image 1 is for the function defining all_cats():

       (All the explanation is given in comments before each statement)

  • Image 2 has the code for testing the function all_cats()
  • Last image has the output of the code.

You might be interested in
What statement would you use to assign the value 32 to the variable cheeses?
bezimeni [28]

Answer:

Statement to assign 32 to variable cheeses.

cheeses=32;

Explanation:

To assign any value to a variable in any programming language, we use "="operator.First declare a variable "cheeses"of type "int" in this case.Then assign 32 to variable "cheeses" with the help of "=" operator.After assigning 32 , variable will store 32 in it.

Implementation in c++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

int cheeses;

cheeses=32;

return 0;

}

6 0
3 years ago
A user reports that a PC gets a BSOD on startup. A technician has researched the error message and found a driver to replace. Wh
7nadin3 [17]

Answer:

The explanation of this question is given below in the explanation section. however, the correct option of this question is "Boot the machine into safe mode"

Explanation:

BSOD error on startup

Blue screen of death error arises mostly when dirver produce fault into system or did not install properly. however, the correct option for this question, if PC gets BSOD error on startup then it is the best option for technician to remove the hardware that is recently installed and/or try to boot the machine into safe mode, then uninstall the driver that causing error on startup.

BSOD error occur during running the program on PC

However, if PC get BSOD during running program, then the best option for technician is to restart the machine and then install the driver properly. During this operation, as error occured, you may loss the data becuase you have no other option to save the data of program that is running.

6 0
3 years ago
Use semaphore(s) to solve the following problem. There are three processes: P1, P2, and P3. Each process Pi has a segment of cod
Lisa [10]

Answer:

See explaination

Explanation:

Here we will use two semaphore variables to satisfy our goal

We will initialize s1=1 and s2=1 globally and they are accessed by all 3 processes and use up and down operations in following way

Code:-

s1,s2=1

P1 P2 P3

P(s1)

P(s2)

C1

V(s2) .

P(s2). .

. C2

V(s1) .

P(s1)

. . C3

V(s2)

Explanation:-

The P(s1) stands for down operation for semaphore s1 and V(s1) stands for Up operation for semaphore s1.

The Down operation on s1=1 will make it s1=0 and our process will execute ,and down on s1=0 will block the process

The Up operation on s1=0 will unblock the process and on s1=1 will be normal execution of process

Now in the above code:

1)If C1 is executed first then it means down on s1,s2 will make it zero and up on s2 will make it 1, so in that case C3 cannot execute because P3 has down operation on s1 before C3 ,so C2 will execute by performing down on s2 and after that Up on s1 will be done by P2 and then C3 can execute

So our first condition gets satisfied

2)If C1 is not executed earlier means:-

a)If C2 is executed by performing down on S2 then s2=0,so definitely C3 will be executed because down(s2) in case of C1 will block the process P1 and after C3 execute Up operation on s2 ,C1 can execute because P1 gets unblocked .

b)If C3 is executed by performing down on s1 then s1=0 ,so definitely C2 will be executed now ,because down on s1 will block the process P1 and after that P2 will perform up on s1 ,so P1 gets unblocked

So C1 will be executed after C2 and C3 ,hence our 2nd condition satisfied.

4 0
3 years ago
Microsoft Edge offers a pane where you can access favorite webpages, open webpages saved to your Reading list, and view the hist
shutvik [7]

Answer:

Hub      

Explanation:

A Hub is a networking tool linking of the different devices or other networking devices.In comparison to router or other a Hub has not routing tables or the guidance where it will sends the information and transmits the data in the network in the respective link.

The hub is used in the Microsoft Edge that provides a panel where we can access favorite web pages. The hub is also used in the  history of the previously visited web pages .

7 0
3 years ago
To find out where a particular command is taken from, you can use the _____________ command.
nikklg [1K]

Answer:

type

Explanation:

7 0
3 years ago
Other questions:
  • I need an answer fast !!! (APEX)
    13·1 answer
  • The system should enable the staff of each academic department to examine the courses offered by their department, add and remov
    14·1 answer
  • ?an ip address reservation is made by creating an association between an ip address and what type of client identifier?
    7·1 answer
  • What is it called when you make a reference in the text of a document alerting the reader that you are using information from an
    10·1 answer
  • How do you know where the home row of the keyboard is?
    14·2 answers
  • AYUDAAAA!!!!! URGENTE!!!!!!1<br> ¿para que sirve la "BIG DATA"?
    9·1 answer
  • How does applying Fontworks effects to text on an advertising flyer change the text?
    14·2 answers
  • Help asap !!!<br>which component of cpu controls the overall operation of computer..​
    9·1 answer
  • What is the difference between HTML and XML?
    8·1 answer
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!