0
def h(n): f = 0 for i in range(1,n+1): if n%i == 0: f = f + 1 return(f == 2)
The function h(n) given above returns True for a positive number n whenever: 1) n is a multiple of 2 2) n is a composite number 3) n is a prime number 4 ) n has an even number of factors
5 ответов
0
f = 0 # must be definiert fitst
def h(n):
for i in range(0, n):
if n%i == 0:
f += f
return(f)
The function h(n) given above returns the number of even numbers in range n.
0
2) n is a composite number. For any explanation regarding my answer, please let me know.
0
KUNAL SHARMA explain your answer!
0
how to develop the while loop programme
0
cant understand anything!!!