Answer:
// program in Python to check perfect number
#function to find number is perfect or not
def is_Perfect_Number(n):
#total variable
tot = 1
i = 2
#sum of all divisor of number
while i*i<=n:
if n%i==0:
tot = tot + i + n/i
if tot == n and n != 1:
return 1
i = i+1
return 0
#read until user enter a perfect number
while True:
#read integer
num = int(input("Input an integer: "))
#call the function
if(is_Perfect_Number(num)):
print(num,"is perfect number")
#if perfect number break
break
else:
print(num,"is not a perfect number")
#ask again
print("try again.")
Explanation:
Read number from user and then call the function is_Perfect_Number() with parameter "num".This will find the sum of all divisor of number.If sum is equal to number then it will return 1 else return 0.If the number is not perfect then it will again ask to enter a number until user enter a perfect number.
Output:
Input an integer: 24
24 is not a perfect number
try again.
Input an integer: 28
28 is perfect number
Answer:
Latency of an object O is shown below.
Explanation:
W segment and stalled state transmits nothing and waits for acknowledgement. The latency is 2 R TT + the time required for server that are using to transmit the object + the amount of time when server is in stalled state. Let K be the number of window that is K= O/WS .The serveries stalled state where K-1 is period of ime with period lasting RTT-(W-1)S/R
latency = 2RTT +O/R +(K-1)[S/R +RTT - WS/R]
After combining the two case
latency = 2 RTT + O/R + (K-1)[S/R +RTT - WS/R]
where [x] means maximum of (x.0). This is the complete ananlysis of the static windows.
server time for transmit the object is (K-1)[S/R +RTT - WS/R]
Answer:
To ensure that the trainees are well acquainted with how to differentiate 568A cables and 568B cables, you must ensure they know appropriate color scheme pattern for the both cables. Also, they are expected to know the correct terminology when using both cables, as 568A is known as a crossover cable and 568B is known as a straight-through cable.
Explanation: