Answer:
import math
# Python program for presenting all the prime numbers till an agreed numeral
prime=[]
def findprimeinanarray(n):
print("Prime numbers admid", 1, "and", n, "are:")
j=0
flag=0
for n in range(1, n + 1):
# all prime numbers are greater than
if n > 1:
for i in range(2, n):
if (n % i) == 0:
flag=0
break
else:
flag=1
if flag==1:
prime.insert(j,n)
j=j+1
else:
continue
print(prime[:])
# A Python function for printing all the prime functions and a Python program to print prime factor
prime1=[]
j=0
# A function to print all the prime factors of a given number if it is not prime
def primeFact(num):
while num % 2==0:
prime1.insert(2,0)
num = num/2
# num should be odd at this breakpoint
# so we need a shift of 2 ( i = i + 2)
for i in range(3,int(math.sqrt(num))+1,2):
# while i divides num , print i ad divide num
while num % i== 0:
num = num /i
if num >2:
j=j+1
prime1.insert(num,j)
print(prime1[:])
# program to test the coderint
n=600
findprimeinanarray(7)
k = 45
primeFact(k)
Explanation:
import math
# Python program for presenting all the prime numbers till an agreed numeral
prime=[]
def findprimeinanarray(n):
print("Prime numbers admid", 1, "and", n, "are:")
j=0
flag=0
for n in range(1, n + 1):
# all prime numbers are greater than
if n > 1:
for i in range(2, n):
if (n % i) == 0:
flag=0
break
else:
flag=1
if flag==1:
prime.insert(j,n)
j=j+1
else:
continue
print(prime[:])
# A Python function for printing all the prime functions and a Python program to print prime factor
prime1=[]
j=0
# A function to print all the prime factors of a given number if it is not prime
def primeFact(num):
while num % 2==0:
prime1.insert(2,0)
num = num/2
# num should be odd at this breakpoint
# so we need a shift of 2 ( i = i + 2)
for i in range(3,int(math.sqrt(num))+1,2):
# while i divides num , print i ad divide num
while num % i== 0:
num = num /i
if num >2:
j=j+1
prime1.insert(num,j)
Answer:
It is an object. And this is because an object has the data and procedures that defines how it is going to react when it is going to be activated. The data is the details about the object, and it explains what the object actually is. And the procedures are the details of the functions that the particular objects can perform. Like for a hospital, data can be mentioning list of medication services they provide, and procedure can be like registering for any medication service, the complete process.
Explanation:
The answer is self explanatory.
How do we call a very small video,that is repeating unlimitedely
Answer:
I don't think there's an age limit for that...
Explanation:
Microsoft word is an example of a graphical word program