Python Code 1: Even or Odd Program Using If-Else & Modulus Operator |

Published: 02 November 2025
on channel: CS UNLOCKED
369
4

In this video, you’ll learn how to write a Python program to check whether a given number is even or odd using the if-else statement and the modulus (%) operator.
This is one of the most basic and important Python programs for beginners.
Watch till the end to understand the logic clearly and improve your Python fundamentals.

📘 Code Used in Video:
n = int(input("Enter a number:"))

if n%2 == 0:
print(n, "is an even number.")
else:
print(n, "is an odd number.")

---------------------------------------------------------------------------------------------------------------

I Walk With Ghosts by Scott Buckley | www.scottbuckley.com.au
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/...

#python #pythonprogramming #pythonforbeginners #pythoncode #evenorodd #ifelse #basicprograms #coding #programming #cs_unlocked #viral


On this page of the site you can watch the video online Python Code 1: Even or Odd Program Using If-Else & Modulus Operator | with a duration of hours minute second in good quality, which was uploaded by the user CS UNLOCKED 02 November 2025, share the link with friends and acquaintances, this video has already been watched 369 times on youtube and it was liked by 4 viewers. Enjoy your viewing!