Computer Science, asked by subhadeepmondapdviek, 11 months ago

1 point
1 point
Consider the following function h.
def h(n):
f = 0
for i in range(1,n+1):
if n%i == 0:
f = f + 1
return(f%2 == 1)
The function h(n) given above returns True for a positive number n whenever:

Answers

Answered by AKASHDIPDAS
0
The function h(n) given returns True for a positive number n whenever n is completely divisible by "i" , i.e., remainder = 0
Answered by yoman5
0
1 point
1 point
Consider the following function h.
def h(n):
f = 0
for i in range(1,n+1):
if n%i == 0:
f = f + 1
return(f%2 == 1)
The function h(n) given above returns True for a positive number n whenever
Similar questions