Q:

write python program prompts user to enter a number, then checks if number is natural or not, a natural number or not natural number, note: natural number is any number higher or equal zero

0

write a python program prompts user to enter a number, then checks if number is natural or not, a natural number or not natural number, note: natural number is any number higher or equal zero

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

N = float(input('enter natural number: '))

if N >= 0:
   print("this number is not natural, natural number should be a positive number")
else:
    print("this is a natural number")

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now