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
tensa zangetsu [6.8K]
3 years ago
11

Write the execution steps if the input is a lion.

Computers and Technology
1 answer:
balandron [24]3 years ago
7 0

Explanation:

Execution step:

1. Starting the program

2. It will get the animal name

3. Check whether the animal eats only plants. Then it prints "Herbivore". If the condition is false, it prints "carnivore".

4. Stop the program

To identify input, output and decision:

Start and Stop (oval): These are neither input nor output

Does it eat only plants?: Decision making statement ("d")

Read the names of the animals(Parallelogram): Input ("i")

Print Herbivore, Print Carnivore: Output "o"

Scenario 1: Input is lion

1. Start

2. Reads the input as "lion"

3. Check if lion eats only plants. So here it is false

4. Print "Carnivore"

5. Stop

Scenario 1: Input is Elephant

1. Start

2. Reads the input as "Elephant"

3. Check if lion eats only plants. So here it is true

4. Print "Herbivore"

5. Stop

You might be interested in
Does anyone have a rbx account? If they do friend request Tribalchief777
Mila [183]

Answer:

ok, no because this site is for hw

Explanation:

8 0
2 years ago
Your program has a two-dimensional array, scores. You are implementing your array with lists. Each member in the array is a pair
Viefleur [7K]

Answer:

scores.append(6,2)

Explanation:

This is a complicated question because in theory, scores.insert can also add values, but I am sure that the only line of code that would work is scores.append(6,2)

7 0
2 years ago
To add a glow effect to WordArt text, which of the following should be done?
g100num [7]
Number 2 is the correct answer
8 0
2 years ago
How are the current and resistance related when the voltage of a circuit is constant?
andreev551 [17]
Since resistance and current are inversely proportional, when the resistance doubles, the current is cut in half.
5 0
2 years ago
Read 2 more answers
Double any element's value that is less than controlValue. Ex: If controlValue = 10, then dataPoints = {2, 12, 9, 20} becomes {4
Aleksandr [31]

Answer:

import java.util.Scanner;

public class StudentScores

{

public static void main(String[] args) {

 Scanner scnr = new Scanner(System.in);

 final int NUM_POINTS = 4;

 int[] dataPoints = new int[NUM_POINTS];

 int controlValue;

 int i;

 controlValue = scnr.nextInt();

 for (i = 0; i < dataPoints.length; ++i) {

     dataPoints[i] = scnr.nextInt();

 }

 for (i = 0; i < dataPoints.length; ++i) {

     System.out.print(dataPoints[i] + " ");

 }

 System.out.println();

 for (i = 0; i < dataPoints.length; ++i) {

     if(dataPoints[i] < controlValue){

         dataPoints[i] = dataPoints[i] * 2;          

     }

     System.out.print(dataPoints[i] + " ");

 }

}

}

Explanation:

*Added parts highligted.

After getting the control value and values for the array, you printed them.

Create a for loop that iterates through the dataPoints. Inside the loop, check if a value in dataPoints is smaller than the contorolValue. If it is, multiply that value with 2 and assign it to the dataPoints array. Print the elements of the dataPoints

5 0
3 years ago
Read 2 more answers
Other questions:
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • ________ employees state-of-the-art computer software and hardware to help people work better together.
    15·1 answer
  • When using a presentation software you can change the size of the text to...? Increase Font size, Decrease font size, increase t
    15·2 answers
  • The first few lines of a script that say "using" ... that point the code to the right groups are called
    11·1 answer
  • Which type of fiber-optic connector, containing one fiber-optic strand per connector, is connected by pushing the connector into
    7·1 answer
  • Industry experts estimate about what percentage of communication is through body language?
    11·2 answers
  • Create a list with 5 numbers and find the smallest and largest number in the list and also the sum and product of the numbers in
    9·1 answer
  • Where can you find the sizing handles for a graphic, shape, or text box? Check all that apply.
    10·2 answers
  • Difference between switch and switch lite
    10·1 answer
  • ___ is a career discipline focusing on helping companies use computer technology effectively.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!