Answer:
I am writing a Python program:
def Eratosthenes(n):
primeNo = [True for i in range(n+1)] # this is a boolean array
p = 2 # the first prime number is initialized as 2
while (p * p <= n): # enumerates all multiples of p
if (primeNo[p] == True):
for i in range(p * p, n+1, p): #update multiples
primeNo[i] = False
p = p + 1
for p in range(2, n): #display all the prime numbers
if primeNo[p]:
print(p),
def main(): #to take value of n from user and display prime numbers #less than or equal to n by calling Eratosthenes method
n= int(input("Enter an integer n: "))
print("The prime numbers less than or equal to",n, "are: ")
Eratosthenes(n)
main()
Explanation:
The program contains a Boolean type array primeNo that is initialized by True which means that any value i in prime array will be true if i is a prime otherwise it will be false. The while loop keeps enumerating all multiples of p starting from 2, and striking them off from the original array list and for loops keep updating the multiples. This process will continue till the p is greater than n. The last for loop displays all the prime numbers less than or equal to n which is input by user. main() function prompts user to enter the value of integer n and then calls Eratosthenes() function to print all the prime numbers less than or equal to a given integer n.
Answer: Interoperability
Explanation:
Interoperability is the skill in system that helps in communicating and exchanging information and services with each other.It can be used in various industries and platform as the task is performed without considering specification and technical build.
- IoT(Internet of things) interoperability faces various challenges like standardization, incompatibility etc.Several steps are taken to for IoT equipment to deal with servers, platforms,applications, network etc.
- Interoperability provides appropriate measure for enhancement of IoT devices .
Answer:
What is the question you have?
Explanation:
Answer:
The correct answer is A) "red"
Explanation:
Using arrays and lists are very helpful when writing programs. They help simplify programs by storing <u>related data</u> under one name.
In the question above the general name is <u>myList</u>. <em>The related data are red, orange, yellow, green, blue, indigo, and violet.</em>
This means that myList contains values a,b,c,d,e,f, and g. However myList[1] only contains value "red".
Cheers!