Find out if a Number is Even or Odd
Even numbers are completely divisible by 2 and have a remainder of zero. When divided by 2, an odd number will always have a remainder greater than 0. We can write a python program using the same logic to determine if the given number is even or odd.
Here is a simple flowchart for the problem.
Python Source Code
Python programming concepts covered are :
- Operators ( we use the remainder operator % to compute the remainder )
- If..else statement
Comments
Post a Comment