Computer Science, asked by eesaprasad27, 2 months ago

The is_positive function should return True if the number received is positive and False if it isn't. Can you fill in the gaps to make that happen?


def is_positive(number):

if number > 0:

return True

else:

___

Answers

Answered by Anonymous
16

Answer :-

return False is the correct answer for the gap.

Correct program :-

def is_positive(number):

‎ ‎ ‎if number > 0 :

‎ ‎ ‎ ‎ ‎ ‎ return True

‎ ‎ ‎else:

‎ ‎ ‎ ‎ ‎ ‎return False

[There were some indentation errors in your program, indentations are a must or else your program will throw an error. I have corrected indentation errors also.]

Similar questions