Answer:
def main():
# Accept data from the user
n=int(input('Enter the value of n:'))
k=2;
sum=0
print('The list of the prime numbers are as follows:')
# This loop runs from k to n
while k<=n:
# Call is_prime() method,
# to check whether k is a prime or not
sum=sum+is_prime(k)
k=k+1
print('Sum of the prime numbers:',sum)
# is_prime() Method
def is_prime(k):
prime=0
i=1
# Check k is a prime or not
while i<=int(k):
# Find the factors of k
if (k % i) == 0:
prime=prime+1
i=i+1
# If k as two factors
if(prime==2):
print(k)
return k;
# If k as more than two factors
else:
return 0;
# Call the main() method
main()
Explanation:
The administrative value of distance of the route refer to the exhibit, for the router r1 to reach the destination ipv6 address of 2001:db8:cafe:4::a is 120. !220 is the administrative distance value of the route between the router r1 to reach the destination of ipv6 address.
Answer:
1 1 1 1 1 1
Explanation:
You copy the first location to the second, and then the second to the third, and so on. Effectively the value of the first location (1) is copied to all locations.
Answer:
string
Explanation:
string holds words while boolean only returns true or false and both binary and float hold numbers