Answer:
Moore's Law: predicts technology power and capacity will double every two years
Computer mouse: a device invented by Douglas Engekbart to work with graphical operating systems
Explanation:
Answer:
Hi!
The correct answer is E.
Explanation:
void change(int ar[], int low, inthigh) {
int temp;
if(low< high) { <em>// here ask if the positions low and high of the array are the same.</em>
temp= ar[low]; <em>// first, saves the element on ar[low] in temp.</em>
ar[low]= ar[high]; <em>// second, the element on ar[high] in ar[low]. First switch.</em>
ar[high]= temp; <em>// third, saves the element on temp in ar[high]. Complete switch.</em>
change(ar,low + 1, high - 1); <em>// Recursive call, adding one position to low, and subtracting one position to high. </em><em>Important: </em><em>When low and high have the same value, the recursive call will finish.</em>
}
}
Result: Switch the lower half of elements in the array with the upper half.
Answer:
- equation = input("Enter an equation: ")
-
- if("+" in equation):
- operands = equation.split("+")
- result = int(operands [0]) + int(operands[1])
- print(operands[0] + "+" + operands[1] + "=" + str(result))
- elif("-" in equation):
- operands = equation.split("-")
- result= int(operands [0]) - int(operands[1])
- print(operands[0] + "-" + operands[1] + "=" + str(result))
- elif("*" in equation):
- operands = equation.split("*")
- result = int(operands [0]) * int(operands[1])
- print(operands[0] + "*" + operands[1] + "=" + str(result))
- elif("/" in equation):
- operands = equation.split("/")
- result = int(operands [0]) / int(operands[1])
- print(operands[0] + "/" + operands[1] + "=" + str(result))
- elif("%" in equation):
- operands = equation.split("%")
- result = int(operands [0]) % int(operands[1])
- print(operands[0] + "%" + operands[1] + "=" + str(result))
Explanation:
The solution code is written in Python 3.
Firstly prompt user to enter an equation using input function (Line 1).
Create if-else if statements to check if operator "+", "-", "*", "/" and "%" exist in the input equation. If "+" is found (Line 3), use split method to get the individual operands from the equation by using "+" as separator (Line 5). Output the equation as required by the question using string concatenation method (Line 6). The similar process is repeated for the rest of else if blocks (Line 7 - 22).
A virus or malware appearing/pretending to be a legitimate program is called a Trojan.