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
Nikitich [7]
2 years ago
11

What is algorithm and how does it works​

Computers and Technology
2 answers:
andre [41]2 years ago
5 0

Answer:

An algorithm, for the non-programmers among us, is a <u><em>set of instructions that take an input, A, and provide an output, B, that changes the data involved in some way</em>.</u> Algorithms have a wide variety of applications. In math, they can help calculate functions from points in a data set, among much more advanced things.

Explanation:

hope it helps

goldfiish [28.3K]2 years ago
3 0

Answer:

An algorithm is a set of instructions for the nonprogrammer among us, taking an input, A, and giving an output, B, which in some way modifies the data involved. A vast array of applications exist for algorithms. In math they can help to calculate functions between much more complicated things from points in a data collection.

Explanation:

You might be interested in
The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * sym
Juli2301 [7.4K]

Answer:

num = int(input("enter a number:"))

print(num * 8)

Explanation:

num is just a variable could be named anything you want.

if code was like this num = input("enter a number:")

and do a print(num * 8)

we get an error because whatever the user puts in input comes out a string.

we cast int() around our input() function to convert from string to integer.

therefore: num = int(input("enter a number:"))

will allow us to do  print(num * 8)

6 0
3 years ago
Instructions Write a program that allows the user to enter the last names of five candidates in a local election and the number
KengaRu [80]

Here is code in java.

import java.util.*;

class Election

{ //main method

   public static void main(String args[]){

      // create an object of Scanner class to read input

      Scanner s = new Scanner(System.in);

      // string array to store name of candidates

       String name[] = new String[5];

       // int array to store vote count of candidates

       int v_count[] = new int[5];

       double p = 0;

       int i = 0, sum = 0, high =0, win = 0;

for(i = 0; i < 5;i++)

       {

          System.out.print("last name of Candidate " + (i+1) + ":");

          // read name of Candidate

          name[i] = s.next();

          System.out.print(" number of votes received: ");

          // read vote of Candidate

           v_count[i] =s.nextInt();

if(v_count[i] > high)

              {

                  // highest vote

                  high = v_count[i];

                  win = i;

              }

              // total vote count

           sum +=v_count[i];

       }

     // printing the output

      System.out.println("\nCandidate\tVotes Received\t% of TotalVotes\n");

       for(i = 0; i < 5;i++)

       {

           // % of vote of each Candidate

           p =(v_count[i]*100)/sum;

           // print the output

          System.out.println(name[i] + "\t\t" + v_count[i] + "\t\t\t" +p);

       }

       // print the total votes

      System.out.println("\nTotal Votes:\t" + sum);

      // print the Winner of the Election

       System.out.println("Winner of the Election is: " + name[win]);

   }

}

Explanation:

Create a string array "name" to store the name of candidates.Create Integer array "v_count" to store votes os each candidates.Calculate total votes of all candidates and find the highest vote amongst all candidate and print it.Find % of votes received by each candidate.Print these stats.

Output:

last name of Candidate 1:patel

number of votes received: 54

last name of Candidate 2:singh

number of votes received: 76

last name of Candidate 3:roy

number of votes received: 33

last name of Candidate 4:yadav

number of votes received: 98

last name of Candidate 5:sharma

number of votes received: 50

Candidate       Votes Received  % of TotalVotes

patel           54                      17.0

singh           76                      24.0

roy             33                      10.0

yadav           98                      31.0

sharma          50                      16.0

Total Votes:  311

Winner of the Election is: yadav

8 0
3 years ago
3.5 lesson practice quiz Edhesive
erik [133]

Answer:

                                                                                     

Explanation:

6 0
2 years ago
Read 2 more answers
Why Java Script uses the prefix Java in itsname?
kifflom [539]

Answer:

Java in JavaScript does not correspond to any relationship with Java programming language.

Explanation:

The prefix Java in Javascript is there for historical reasons.

The original internal name of Javascript when it was created by Brendan Eich at Netscape was Mocha. This was released to public as Livescript in 1995. The name Livescript was eventually changed to Javascript in Netscape Navigator 2.0 beta 3 release in December 1995 after Netscape entered into an agreement with Sun Microsystem. The primary purpose of change of name seemed to be as a marketing aid to benefit from the growing popularity of Java programming language at that time.

4 0
3 years ago
What protocol suite below is the most commonly used protocol for local area network (lan) communication?
grandymaker [24]
Answer TCP/IP is the most common protocol in Local Area Networks.
3 0
3 years ago
Other questions:
  • You are part of the team to implement new software at XYZ Inc. The employees at XYZ Inc. trust the results of the old software p
    5·1 answer
  • Only put coolant into your radiator when the engine is<br> A. on<br> B. hot<br> C. warm<br> D. cool
    6·1 answer
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • An Internet Service Provider (ISP) is a company that builds the routers and wired connections that allow individuals to access t
    12·2 answers
  • Suppose an IP packet is fragmented into 10 fragments, each with a 1% (independent) probability of loss. To a reasonable approxim
    15·1 answer
  • What is the alogarithm for solving the perimeter of a triangle
    11·1 answer
  • Describe how data is transmitted using half-duplex serial data transmission.
    9·1 answer
  • ACTIVITY NI MATCHING TYPE Directions: Match Column A with Column B. Write the letter of the correct answer on the space provided
    7·1 answer
  • Please help!!
    6·1 answer
  • Consider the following code snippet that appears in a subclass: public void deposit(double amount) { transactionCount ++; deposi
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!