Answer:
I am writing the function using Python. Let me know if you want the program in some other programming language.
def iterPower(base, exp):
baseexp = 1
while exp > 0:
baseexp = baseexp*base
exp= exp - 1
return baseexp
base = 3
exp = 2
print(iterPower(base, exp))
Explanation:
- The function name is iterPower which takes two parameters base and exp. base variable here is the number which is being multiplied and this number is multiplied exponential times which is specified in exp variable.
- baseexp is a variable that stores the result and then returns the result of successive multiplication.
- while loop body keeps executing until the value of exp is greater than 0. So it will keep doing successive multiplication of the base, exp times until value of exp becomes 0.
- The baseexp keeps storing the multiplication of the base and exp keeps decrements by 1 at each iteration until it becomes 0 which will break the loop and the result of successive multiplication stored in baseexp will be displayed in the output.
- Here we gave the value of 3 to base and 2 to exp and then print(iterPower(base, exp)) statement calls the iterPower function which calculates the exponential of these given values.
- Lets see how each iteration works:
baseexp = 1
exp>0 True because exp=2 which is greater than 0
baseexp = baseexp*base
= 1*3 = 3
So baseexp = 3
exp = exp - 1
= 2 - 1 = 1
exp = 1
baseexp = 3
exp>0 True because exp=1 which is greater than 0
baseexp = baseexp*base
= 3*3 = 9
So baseexp = 9
exp = exp - 1
= 1-1 = 0
exp = 0
- Here the loop will break now when it reaches third iteration because value of exp is 0 and the loop condition evaluates to false now.
- return baseexp statement will return the value stored in baseexp which is 9
- So the output of the above program is 9.
Answer:
D. Identify the problem.
Explanation:
There are six steps or stages in computer system troubleshooting. They are,
1. Identify the problem: In the stage of troubleshooting, the user is interviewed to get a description of the problem. Reproducing the problem is essential to confirm the described problem of the system before moving to the next stage.
2. Establish a theory of probable cause: when the problem is identified, a list of the possible cause of the problem is made.
3. Test the theory to determine a cause: each items on the list of possible cause of the problem is tested to confirm its actual cause.
4. Resolve the problem.
5. Verify full system functionality
6. Document the findings, actions and outcomes.
La unidad de medida de energía oficial es el Joule (J). El kilovatio / hora (kWh), utilizado especialmente para la energía eléctrica, debe figurar entre las unidades más comunes de medición de energía (de hecho, se utiliza para calcular las facturas de electricidad). Entonces es B.
Answer:d)Use online databases to update and backup the data.
Explanation: Data backup is the creation of copy of the data to be stored in the secondary memory.This data is utilized when the data is lost or deleted from original positional and thus gets restored . Database are used for the updating the backed-up data on online mode.
Other options are incorrect because it does not creates copies for the offices members to take home, no data storage is created in following organization and does not store data in external disk.Thus, the correct option is option(d).