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
Masja [62]
3 years ago
15

The function below takes a single string parameter: input_string. If the input contains the lowercase letter z, return the strin

g 'has the letter z'. Otherwise, return the string 'not worthwhile'.

Engineering
1 answer:
Whitepunk [10]3 years ago
4 0

Answer:

# string_contains function is defined with input_string

# as arguments

def string_contains(input_string):

   # if-statement that check if letter z is in input_string

   if 'z' in input_string:

       # it print"has the letter z" if it has z

       print("has the letter z")

   else:

       # else it print "not worthwhile"

       print("not worthwhile")

       

# string_contains function is called

string_contains("The animal is zebra")        

string_contains("learning is fun")

Explanation:

The code is written in Python and well commented.

Image of the output when the function is called is attached.

You might be interested in
Drivers killed in speed related accidents usually have a history of_______
bazaltina [42]
I would go with C but i am not 100 percent on that
3 0
3 years ago
Read 2 more answers
How does java achieve portable
sergejj [24]

Answer:

Java is called portable because you can compile a java code which will spew out a byte-code, and then you run that code with Java Virtual Machine. Java Virtual Machine is like an interpreter, which reads the compiled byte-code and runs it. So first of all, you need to install the JVM on the system you want.

Explanation:

5 0
3 years ago
Information or signals entered into a computer system is
Virty [35]

<em>Logs.</em>

<em>Like data logs. Sometimes people make these logs to keep tabs on other people or to get important information put down somewhere that way it is saved and can be looked back upon later. Anytime someone makes an action on the computer, it makes a TMP file representing a log of what you want it to do before the computer quickly get's rid of the file.</em>

<em>-Ɽ3₮Ɽ0 Ⱬ3Ɽ0</em>

<em />

8 0
3 years ago
In javaWrite a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the out
Pavel [41]

Answer:

// Program is written in Java Programming Language

// Comments are used for explanatory purpose

import java.util.*;

public class FlipCoin

{

public static void main(String[] args)

{

// Declare Scanner

Scanner input = new Scanner (System.in);

int flips;

// Prompt to enter number of toss or flips

System.out.print("Number of Flips: ");

flips = input.nextInt();

if (flips > 0)

{

HeadsOrTails();

}

}

}

public static String HeadsOrTails(Random rand)

{

// Simulate the coin tosses.

for (int count = 0; count < flips; count++)

{

rand = new Random();

if (rand.nextInt(2) == 0) {

System.out.println("Tails"); }

else {

System.out.println("Heads"); }

rand = 0;

}

}

7 0
3 years ago
Which of the following is true about modern hydraulic lifts?
kaheart [24]

The modern hydraulic lifts make use of biodegradable fluid to transmit hydraulic power

<em>Question: The options are left out in the question. The details and facts about the modern hydraulic lift are presented here</em>

<em />

Details about the modern hydraulic lifts include;

The development of the  modern hydraulic occurred in the Industrial Revolution to perform task done previously by steam powered elevators  

The power of the hydraulic lift come from the hydraulic cylinder known as the actuator, which in turn is powered by pressurized hydraulic fluid such as oil

The hydraulic fluid is pushed by a piston rod through which energy is capable of being transferred, such that the applied force is multiplied, to provide more power for lifting

<u>Facts about the modern hydraulic lifts include;</u>

  • The dry motor in the modern hydraulic lift is more efficient and consumes 20% less energy
  • It comprises of valves that are controlled electronically such that the response is much rapid and the energy consumption is reduced by a further 20%
  • The cars used in the modern lift are lighter, as well as the slings, which reduces the power usage by 20%
  • It makes use of chemicals which are environmentally friendly as hydraulic fluid
  • The flash point of the fluid used is higher, as well as it posses 50% lower compressibility as well elasticity

Learn more here:

brainly.com/question/16942803

6 0
2 years ago
Other questions:
  • given the classes above, what output is produced by the following code? meg[] elements ={new Lois(), new Stewie(), new Meg(), ne
    15·1 answer
  • 3. (9 points) A square-thread power screw is used to raise or lower the basketball board in a gym, the weight of which is W = 10
    12·1 answer
  • The density of a certain material is such that it weighs 9 pounds per cubic foot of
    10·1 answer
  • IN JAVA,
    6·1 answer
  • Q1. Basic calculation of the First law (2’) (a) Suppose that 150 kJ of work are used to compress a spring, and that 25 kJ of hea
    6·1 answer
  • What is this i dont understand this at all
    9·1 answer
  • A person is interested in becoming an electrician. What are some appropriate types of preparation that this individual can consi
    7·2 answers
  • What is the most likely reason the rover won't travel in a straight line?
    9·1 answer
  • Expert Review is done by end users.
    9·1 answer
  • Technician A says that acid core solder should be used whenever aluminum wires are to be soldered.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!