Levi can use the bash command to type all the commands on the same line to type one after the other character without requiring input.
<u>Explanation</u>:
- He wants to run five commands. For one command it will take exactly 20 minutes. So it will take one hour forty minutes.
- To type all of the commands on the same line Levi should use the bash command. For inserting the bash command Levi should use backslash \ as the last character of the line.
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:
See there are multiple ways to get a perfect shot of products to stand out but the most affective according to me are explained below :-
- Macro shooting - These are close shots u can say really close just to show the product more attractive and u can see these types of shots in every advertisement.
- Background shooting/shots - Opposite of macro shots.
- 3d shots - These are 360° shots.
Tip :- Use wide aperture like F2 and right aperture for right shots.
Hope it helps!
When you let the mouse pointer
pause for a moment or two over an item, it is called Hovering. Hovering means
positioning the pointer to a specific object without clicking yet any mouse
buttons. You also do not move it for at least a second. Hovering the mouse
pointer may have the targeted object display its infotip or tooltip.