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
Roman55 [17]
3 years ago
5

A(n) ____________ for a computer program is a set of steps that explains how to begin with known information specified in a prob

lem statement and how to manipulate that information to arrive at a solution.​
Computers and Technology
1 answer:
Viefleur [7K]3 years ago
4 0

Answer:

​algorithm

Explanation:

A(n) ​algorithm for a computer program is a set of steps that explains how to begin with known information specified in a problem statement and how to manipulate that information to arrive at a solution.​

You might be interested in
Jason wants to set up his Wi-Fi’s security. He cannot install a central server for authentication. However, he wants to use a pr
jolli1 [7]

Answer:

Answer = a ig

wpa. ig ig ig ig

4 0
3 years ago
Many mobile devices include a mini- ________ port.
nekit [7.7K]
USB Port, otherwise how would you plug it externally?
5 0
3 years ago
Write a method named coinFlip that accepts as its parameter a string holding a file name, opens that file and reads its contents
V125BC [204]

Answer:

Here is the JAVA program:

import java.io.*;

import java.util.*;

public class Main {

public static void main(String[] args) throws FileNotFoundException{ //the start of main() function body, it throws an exception that indicates a failed  attempt to open the file

Scanner input = new Scanner(new File("file.txt")); //creates a Scanner object and a File object to open and scan through the file.txt    

coinFlip(input);    } //calls coinFlip method

public static void coinFlip(Scanner input) { //coinFlip method that accepts as its parameter a string input holding a file name

while(input.hasNextLine()) { //iterates through the input file checking if there is another line in the input file

Scanner scan = new Scanner(input.nextLine()); //creates a Scanner object

int head = 0; // stores count of number of heads

int count = 0; //stores count of  total number of tokens

while(scan.hasNext()) { //iterates through the sequence checking if there is another sequence in the input file

String token= scan.next(); // checks and returns the next token

if (token.equalsIgnoreCase("H")||token.equalsIgnoreCase("Heads")) { //compares H or Heads with the tokens in file ignoring lower case and upper case differences

           head++;                } //if a token i.e. any form of heads in file matches with the H or Heads then add 1 to the number of heads

           count++;            } //increment to 1 to compute total number of counts

double result = Percentage(head, count); //calls Percentage method passing number of heads and total counts to compute the percentage of heads

System.out.println(head + " heads " + "(" + result +"%)"); // prints the number of heads

if(result >= 50.00) { //if the percentage is greater or equal to 50

System.out.println("You win!");} //displays this message if above if condition is true

else //if the percentage is less than 50

{System.out.println("You lose!");}  }    } //displays this message if above if condition is false

public static double Percentage(int h, int total) { //method to compute the percentage of heads

double p = (double)h/total* 100; // divide number of heads with the total count and multiply the result by 100 to compute percentage

return p;    } } //returns result

Explanation:

The program is well explained in the comments mentioned with each line of the above code. I will explain how the method coinFlip  works.

Method coinFlip accepts a string holding a file name as its parameter. It opens that file and reads its contents as a sequence of tokens. Then it reads and scans through each token and the if condition statement:

if (token.equalsIgnoreCase("H")||token.equalsIgnoreCase("Heads"))

checks if the each token in the sequence stored in the file is equal to the H or Heads regardless of the case of the token. For example if the first token in the sequence is H then this if condition evaluates to true. Then the head++ statement increments the count of head by 1. After scanning each token in the sequence the variable count is also increased to 1.

If the token of the sequence is HeAds then this if condition evaluates to true because the lower or upper case difference is ignored due to equalsIgnoreCase method. Each time a head is found in the sequence the variable head is incremented to 1.

However if the token in the sequence is Tails then this if condition evaluates to false. Then the value of head variable is not incremented to 1. Next the count variable is incremented to 1 because this variable value is always incremented to 1 each time a token is scanned because count returns the total number of tokens and head returns total number of heads in the tokens.

Percentage method is used to return the percentage of the number of heads in the sequence. It takes head and count as parameters (h and total). Computes the percentage by this formula h/total* 100. If the result of this is greater than or equal to 50 then the message  You win is displayed otherwise message You lose! is displayed in output.

3 0
3 years ago
Why is the shade of brown important when baking flour products?
kupik [55]
I believe its just for color or something but my mom has told me its because its almost like a thickner
5 0
3 years ago
If no help file is available for a particular dialog box, then, when you press the F1 key, the ____ opens.
nadya68 [22]

B. main Help window. Try pressing F1 in google chrome. A google support link will show up.

6 0
3 years ago
Other questions:
  • Which structure does a web page normally use to define an area of focus?
    8·1 answer
  • Your client expresses that they want their new website to have a responsivedesign with consistent coding. They are concerned wit
    5·1 answer
  • Media convergence is the result of the integration of the different media technologies. Please select the best answer from the c
    13·2 answers
  • Write a C++ function, lastLargestIndex that takes as parameters an int array and its size and returns the index of the last occu
    10·1 answer
  • Which type of software coordinates the hardware and software of a computer to work efficiently and productively?
    5·2 answers
  • 4. Write an appropriate comment for describ-
    11·1 answer
  • Write convert() method to cast double to int
    7·1 answer
  • How many months have 28 days?
    8·1 answer
  • It's best to use assertive speech when you<br> I want to show respect. *<br> True<br> False
    8·2 answers
  • With social media presence growing why is cyberbullying at an all time high
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!