Answer:
The answer to this question is given below in the explanation section.
Explanation:
An algorithm is the list of a finite set of instructions and rules that a computer needs to do to complete a task in order to solve a problem.
In short, an algorithm is a series of instructions that are implemented step by step to solve a problem. For example, you could consider a pizza recipe an algorithm for making a pizza in an everyday life routine. But when you are talking about using algorithms in computation and in mathematics. It means that solving a problem using a series of steps step by step.
For example, your everyday tasks aligned on a google calendar and remind you about your tasks using the alarm, etc- how to implement this using set of instructions and rules- is an algorithm.
Solving a quadratic equation is another example of an algorithm.
Binary search, array sorting are an example of an algorithm in computation. Because these algorithms based on the execution of step-by-step instruction to solve a problem such as sorting a list of numbers etc.
Answer:
1. Processor communication -- this involves the following tasks:
<em>a. exchange of data between processor and I/O module</em>
<em>b. command decoding - I/O module accepts commands sent from the processor. E.g., the I/O module for a disk drive may accept the following commands from the processor: READ SECTOR, WRITE SECTOR, SEEK track, etc. </em>
<em>c. status reporting – The device must be able to report its status to the processor, e.g., disk drive busy, ready etc. Status reporting may also involve reporting various errors. </em>
<em>d. Address recognition – Each I/O device has a unique address and the I/O module must recognize this address. </em>
<em />
2. Device communication – The I/O module must be able to perform device communication such as status reporting.
3. Control & timing – The I/O module must be able to co-ordinate the flow of data between the internal resources (such as processor, memory) and external devices.
4. Data buffering – This is necessary as there is a speed mismatch between speed of data transfer between processor and memory and external devices. Data coming from the main memory are sent to an I/O module in a rapid burst. The data is buffered in the I/O module and then sent to the peripheral device at its rate.
5. Error detection – The I/O module must also be able to detect errors and report them to the processor. These errors may be mechanical errors (such as paper jam in a printer), or changes in the bit pattern of transmitted data. A common way of detecting such errors is by using parity bits.
Answer:
function pecoDesconto(preco, estaComDesconto) {
let p = preco;
let desconto = estaComDesconto;
if(p > 100 && desconto == false){
return "Quero pechinchar";
}else{
return "Negócio fechado";
}
}
Explanation:
function pecoDesconto(preco, estaComDesconto) {
// Implemente a função ao lado, que recebe um preço//
let p = preco;
// variavel que indica desconco//
let desconto = estaComDesconto;
//Se o preço for maior que 100 e não estiver com desconto, a função deve retornar Quero pechinchar.//
if(p > 100 && desconto == false){
return "Quero pechinchar";
//Caso contrário, deve retornar Negócio fechado
}else{
return "Negócio fechado"
}
}
só te faltou ler com atenção, e um pouco de logica!
A <span>stagflation is my answer.</span>