How can we make our programs behave differently each time they are run?

Answers

Answer 1
Answer:

Answer:

By given the right speech as much as the answers must be

Explanation:

By given the right speech as much as the answers must be


Related Questions

Choose a topic related to a career that interests you and think about how you would research that topic on the Internet. Set a timer for fifteen minutes. Ready, set, go! At the end of fifteen minutes, review the sources you have recorded in your list and think about the information you have found. How w
Given an array A of n + m elements. It is know that the first n elements in A are sorted and the last m elements in A are unsorted. Suggest an algorithm (only pseudo code) to sort A in O(mlogm +n) worst case running time complexity. Justify.
Assume that two computers are directly connected by a very short link with a bandwidth of 125 Mbps. One computer sends a packet of 1000 Bytes to the other computer. What’s the end-to-end delay (ignoring the propagation delay)?
Plz answer me will mark as brainliest ​
What is the term used to describe participants starting a study but then leaving it? o abandonment o drop outs o margin of error O mortality

The string expression strVar.____________________ starts at index pos, replaces the next n characters of strVar with all the characters of str.

Answers

Answer:

strVar.replace(pos, n, str);

Explanation:

The strVar.replace() is a javascript function of searching and replacing a string for a defined value, whereby it finds and returns a new string where the defined values are replaced.

For example: to return a string where "Trump" is replaced with "Biden":

We have

var str = "Welcome Trump!";

var res = str.replace("Trump", "Biden", str);

Hence, in this case, the correct answer is strVar.replace(pos, n, str);

What is computer virus?

Answers

It is a (software) program that is installed on a computer without the user's knowledge for the purpose of making harmful changes. A computer virus attaches itself to another program (the execution of the host program triggers the action of the virus). And most of them perform actions that are malicious in nature, such as destroying data. A computer virus operates in two ways: As soon as it lands on a new computer, begins to replicate or it plays dead until the trigger kick starts the malicious code. The term 'computer virus' was formally defined by Fred Cohen in 1983.

Answer:

A computer virus is a virus attached onto your computer, and it gives you bugs and can often delete your important files.

Write an if statement that assigns 100 to x when y is equal to 0. 32. Write an if/else statement that assigns 0 to x when y is equal to 10. Otherwise it should assign 1 to x. 33. Using the following chart, write an if/else if statement that assigns .10, .15, or .20 to commission, depending on the value in sales. Sales Commission Rate Up to $10,000 10% $10,000 to $15,000 15% Over $15,000 20%

Answers

Answer:

1.  

if(y==0.3){ x = 100;}

2.

if(y == 10){

x = 0; }

else {

x = 1; }

3.

if(sales< 10000){

commission = 0.10;

}

else if(sales>= 10000 && sales <= 15000 ){

commission = 0.15;

}

else{

commission = 0.20;

}

Explanation:

The statements written in brackets represent the conditions while the statements in {...} represent the operation that would be executed depending on the outcome of the if statement.

For 1: if(y==0.3){ x = 100;}

If y is 0.3, 100 would be assigned to x

For 2:

if(y == 10){ x = 0; }

If y is 10, 0 would be assigned to x

else { x = 1; }

If otherwise, 1 would be assigned to x

For 3:

if(sales< 10000){commission = 0.10;}

Is sales is less than 10000, commission would be 0.10

else if(sales>= 10000 && sales <= 15000 ){commission = 0.15;}

If sales is within range of 10000-15000, commission would be 0.15

else{commission = 0.20;}

If otherwise, commission would be 0.20

My friend Leo wants to have an emergency plan for his final exams on University of Southern Algorithmville. He has N subjects to prepare for, and for each subject, his score is determined only by the time he spend on learning. It's not surprising that Leo found out he actually spent zero time on preparing before. At least he knows when he can start learning all of these subjects. For each subject i, there is a start time, si when he can get all materials ready to start learning. And there is also a ending time ei for each subject, when his learning materials expire and he can't learn anymore. We know that si and ei are integers, and Leo can only dedicate to a single subject within each time phase. Universtiy of Southern Algorithmville (USA), a student's total grade is the minimum grade among all subjects. Leo wants you to help him find out the best outcome. Given N subjects and their time intervals (si; ei ), design an algorithm to find out the maximum time possible for the least prepared subject. Prove the correctness of your algorithm. (Hint: It's not enough to use the network ow algorithm alone to determine the answer.)

Answers

Answer:

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algorithms are used for optimization problems. An optimization problem can be solved using Greedy if the problem has the following property: At every step, we can make a choice that looks best at the moment, and we get the optimal solution of the complete problem.

If a Greedy Algorithm can solve a problem, then it generally becomes the best method to solve that problem as the Greedy algorithms are in general more efficient than other techniques like Dynamic Programming. But Greedy algorithms cannot always be applied. For example, the Fractional Knapsack problem (See this) can be solved using Greedy, but 0-1 Knapsack cannot be solved using Greedy.

The following are some standard algorithms that are Greedy algorithms.

1) Kruskal’s Minimum Spanning Tree (MST): In Kruskal’s algorithm, we create an MST by picking edges one by one. The Greedy Choice is to pick the smallest weight edge that doesn’t cause a cycle in the MST constructed so far.

2) Prim’s Minimum Spanning Tree: In Prim’s algorithm also, we create an MST by picking edges one by one. We maintain two sets: a set of the vertices already included in MST and the set of the vertices not yet included. The Greedy Choice is to pick the smallest weight edge that connects the two sets.

3) Dijkstra’s Shortest Path: Dijkstra’s algorithm is very similar to Prim’s algorithm. The shortest-path tree is built up, edge by edge. We maintain two sets: a set of the vertices already included in the tree and the set of the vertices not yet included. The Greedy Choice is to pick the edge that connects the two sets and is on the smallest weight path from source to the set that contains not yet included vertices.

4) Huffman Coding: Huffman Coding is a loss-less compression technique. It assigns variable-length bit codes to different characters. The Greedy Choice is to assign the least bit length code to the most frequent character. The greedy algorithms are sometimes also used to get an approximation for Hard optimization problems. For example, the Traveling Salesman Problem is an NP-Hard problem. A Greedy choice for this problem is to pick the nearest unvisited city from the current city at every step. These solutions don’t always produce the best optimal solution but can be used to get an approximately optimal solution.

3. If B3=6 and D5=8, what would the following function return? IF(B3>D5, "Closed", D5-B3) *A. "Closed"
B. -2
C. "Open"
D. +2

Answers

Answer:

D. +2

Explanation:

The given function is an IF function where the first argument is a logical test, the second argument is the result if the logical test is true and the third argument is the result if the logical test is false. Depending on whether the result of the logical test is true or false, the respective value will be returned.

IF(logical_test, value_if_true, value_if_false)

In this case, the logical test first compares the value of B3 and D5. As B3 is not greater than D5, the result is false and the value for false will be returned. The value for false result of the logical test is equated by D5-B3 which is equal to 2. Thus the result of the IF function is +2.

Hello, Good Works mate!

Answer: B) -2
*The result will be negative.

Kind Regards

What is the correct meaning of judgment

Answers

1a : the process of forming an opinion or evaluation by discerning and comparing careful judgment of the odds. b : an opinion or estimate so formed is not worth doing in my judgment. 2a : the capacity for judging : discernment be guided by your own judgment showing poor judgment.