The Answer is A: <span>along one of the division lines. </span>
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.
An unshielded cable are twisted pair is used to connect modem in telecommunication industry to connect computer through telephone cable, Ethernet cables it is called as UTP cables.
<u>Explanation:</u>
These UTP cables are twisted cables where conducted are used in form of single circuit.
These types of UTP cables used to connect modem to establish connection to other networks for internet or connecting to other side computer or desktop or laptops.
UTP cables uses rj-45 or rj-11 or rs232 or rs 499. Normally rs-45 with cat 5e cable is used to connect LAN. Rj-11 is used to connect to modem for dial purpose.
If we use ip networks RJ-45 will do both.
Answer:
Yes
Explanation:
Check MongoDB on Github and you will see that it is open source.
Answer:
Following are the Python program to this question: t=float(input("Enter time value in seconds: "))#input time in seconds by user
d = t // (24 * 3600) #calculate day and store in d variable t= t % (24 * 3600)#calculate time and store in t variable h = t // 3600#calculate hour and store in h variable t %= 3600#calculate time and store in t variable m=t // 60#calculate minutes and store in m variable t%= 60#calculate time and store in t variable s = t#calculate second and store in s variable print("day:hour:minute:second= %d:%d:%d:%d" % (d,h,m,s))#print calculated value
Output:
Enter time value in seconds: 1239876
day:hour:minute:second= 14:8:24:36
Explanation:
Description of the above can be defined as follows:
- In the above Python program code an input variable "t" is declared, which uses the input method to input value from the user end.
- In the next step, "d, m, and s" is declared that calculates and stores values in its variable and at the last print, the method is used to print its value.