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
gladu [14]
3 years ago
11

What is the Role of an algorithm?

Computers and Technology
1 answer:
igor_vitrenko [27]3 years ago
8 0

Answer:

Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output.

pls Mark me as brainliest trust me

You might be interested in
What is an IF statement used for?
kiruha [24]

The IF statement is a decision-making statement that guides a program to make decisions based on specified criteria. The IF statement executes one set of code if a specified condition is met (TRUE) or another set of code evaluates to FALSE.

8 0
2 years ago
Write a Python 3 program to read from a .csv file containing rates from power companies. Your program should determine the avera
aliya0001 [1]

Answer:

In python:

file = open("rates.csv", "r")

ratecount = 0

ratesum = 0

mylist = []

rates = file.readlines()

for nums in rates:

     num = nums.rstrip('\n')

     mylist.append(int(num))

     for i in num:

           ratesum= ratesum + int(i)

           ratecount = ratecount + 1

print("Maximum Rate: "+str(max(mylist)))

print("Minimum Rate: "+str(min(mylist)))

print("Average Rate: "+str(ratesum/ratecount))

Explanation:

This opens the csv file

file = open("rates.csv", "r")

This initializes the number of rates in the file

ratecount = 0

This initializes the sum of the rates

ratesum = 0

This initializes an empty list

mylist = []

This reads the rates into lines

rates = file.readlines()

This iterates through the rates (as a string)

for nums in rates:

This removes the newline character \n in the rates

     num = nums.rstrip('\n')

This appends the rates (as an integer) to the empty list

     mylist.append(int(num))

The following counts the rates in the file and also sum them up

<em>      for i in num: </em>

<em>            ratesum= ratesum + int(i) </em>

<em>            ratecount = ratecount + 1 </em>

This prints the maximum of the rates

print("Maximum Rate: "+str(max(mylist)))

This prints the minimum of the rates

print("Minimum Rate: "+str(min(mylist)))

This calculates and prints the average rate

print("Average Rate: "+str(ratesum/ratecount))

6 0
3 years ago
. Consider the problem of finding the largest element in a list of n elements. What will be the basic operation of an algorithm
natali 33 [55]

Answer:

Comparison.

Explanation:

When we have to find a largest in a list of n elements.First we have to iterate over the list so we can access all the elements of the list in one go.Then to find the largest element in the list we have to initialize a variable outside the loop with the minimum value possible and in the loop compare each element with this value,if the element is greater than the variable assign the element to the variable.Then the loop will find the largest element and it will be the variable.

4 0
3 years ago
what is a tool or electrical system means intentionally creating a low-resistance path that connects to the earth
nikklg [1K]
A comper??><>?????????????????????????????????????
7 0
3 years ago
Which method call converts the value in variable stringVariable to an integer?
zlopas [31]

Answer:

The correct answer for the given question is Integer.parseInt( string variable );

Explanation:

Integer.parseInt( string variable ); is the method in a java programming language that convert the string into the integer value. It takes a string variable and converted into the integer.

Following are the program in java which convert the string value into an integer value.

class Main  

{

 public static void main(String []args) // main function

{

   String str1 = "10009";

// variable declaration

   int k = Integer.parseInt(str1);

// convert the string into integer.

   System.out.println("Converted into Int:" + k);

}

}

Output:

Converted into Int:10009

Convert.toInt( stringVariable );

Convert.parseInt( stringVariable,Integer.toInt( stringVariable ); are not any method to convert the string into integer .

Therefore the correct answer is :Integer.parseInt( stringVariable );

3 0
3 years ago
Other questions:
  • Which type of topology describes the physical arrangement, installation, and connection of cables, computer, and other devices?
    10·2 answers
  • Changes in the ownership of a file do not change the amount of data that is considered to belong to a user.
    12·1 answer
  • Good afternoon guys !!!
    14·2 answers
  • IN THE MOVIE BACK TO THE FUTURE 1985 IS 1985 THE PUBLICATION DATE?WHERE CAN I FIND THE MOVIE?
    6·1 answer
  • Which browser should you choose if you want all viewing information except thumbnail previews of websites?
    15·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • HELP PLEASE I WILL GIVE YOU 15 POINTS!
    8·1 answer
  • Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the dir
    15·1 answer
  • Pls awnser if awnser is wrong I will unmark brainliest
    5·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!