Computer Science, asked by shahissain, 1 year ago

write a Python coding to accept a number and check it is positive or negative or equal to zero​

Answers

Answered by LuckyYadav2578
9

n = int ( input ( "enter any number " ) )

if n < 0 :

_____ print ( " number is negative " )

elif n = 0:

_____ print ( " number is zero " )

else :

_____ print ( " number is positive ")

way of execution

First it will input a number then that number goes in the if condition if the input number satisfied the condition then it will print number is negative and if the condition will not satisfied number will be checked by the next conditions that the number is equal to zero or not if the condition become true it will print number is zero. If both the condition is not satisfied, then last else condition will execute and it will print number is positive.

note: using --> _____ for indentation. Imagine it invisible.

Similar questions