Different ways to find twhether the number is positive or not
Answers
Answered by
0
HI mate GM here is your answer...,
1-A number is positive if it is greater than zero. We check this in the expression of if.
2-If it is False, the number will either be zero or negative.
3-This is also tested in subsequent expression.
4-In case of odd and even A number is even if it is perfectly divisible by 2.
5-When the number is divided by 2, we use the remainder operator % to compute the remainder.
6-If the remainder is not zero, the number is odd.
Example:- Input : 10
Output :
Positive number 10 is Even
Input : 0
Output : 0 is Even
I hope it will help you and mark me as a brain list answer plz.
1-A number is positive if it is greater than zero. We check this in the expression of if.
2-If it is False, the number will either be zero or negative.
3-This is also tested in subsequent expression.
4-In case of odd and even A number is even if it is perfectly divisible by 2.
5-When the number is divided by 2, we use the remainder operator % to compute the remainder.
6-If the remainder is not zero, the number is odd.
Example:- Input : 10
Output :
Positive number 10 is Even
Input : 0
Output : 0 is Even
I hope it will help you and mark me as a brain list answer plz.
Similar questions