Answer:
Algorithms are a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
Pseudo code is an informal description of an algorithm or how a program will function.
a. An example of an algorithm using coding terminology would be a function to find the largest or smallest number in a user-defined array.
b. A function that could include an algorithm would be a function that compares input.
c. Pseudo code could be used to outline a part of a program that has to carry out a specific function.
I hope that helped! If you have any questions I am glad to help.
Answer:
See explaination for the illustrations on the question.
Explanation:
A program cache miss usually occurs at the instance of an instruction fetch failing to read an instruction from the program cache and the processor is required to access the instruction from the next level of memory. A request to L2 or external memory has a much higher latency than an access from the first level instruction cache.
A cache on its own can be defined as is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost (time or energy) to access data from the main memory.
Please kindly check attachment for the step by step diagramming illustrations of the questions.
Answer:
Scientifically speaking both are equally as effective as long as you thoroughly cover the surface of your hands, massage between your fingers, and under your nails.
Explanation:
Answer:
- let employee1 = {
- Name : "Kate",
- Hour : 38,
- };
-
- let employee2 = {
- Name : "John",
- Hour : 45,
- };
-
- let employee3 = {
- Name : "Catherine",
- Hour : 40,
- };
-
- let employeeArr = [employee1, employee2, employee3];
-
- let payrollRef = document.getElementById("payroll");
-
- let output = "";
-
- for(let i = 0; i < employeeArr.length; i++){
- let h = employeeArr[i].Hour;
- let pay;
-
- if(h <=40){
- pay = h * 15;
- }else{
- pay = 40 * 15;
- pay += (h - 40) * 15 * 1.5;
- }
-
- output += "Employee Name: " + employeeArr[i].Name + "<br>";
- output += "Total working hour: " + employeeArr[i].Hour + "<br>";
- output += "Total pay: $" + pay + "<br>";
- output += "<hr>"
- }
-
- payrollRef.innerHTML = output;
Explanation:
Presume there is a div element with id "payroll" in a html file. We can write a JavaScript to create a payroll report and place the output to the div.
In JavaScript, let's presume there are only three employees and their names and total working hour are recorded in three objects (Line 1 - 14). Next, we put those employee objects into an array, employeeArr (Line 16).
Next, create a for loop to traverse through each object from employeeArr and calculate the pay based on their working hour (Line 22 - 31).
Next, generate the output string which includes employee name, working hour and total pay (Line 33 -36).
At last, set the output string as the contents payroll (Line 39).