ProgramDoc
  • Tutorials
    PythonJavaScriptSQLCC++HTMLC#Swift
  • Courses
    PythonNode JsJavascriptReact JsDjangoMySqlSwiftHTML
  • Course Directory
  • Blog

python Tutorial

python hello worldpython add two numberspython maximum of two numberspython swap variablespython find square rootpython solve quadratic equationpython find the area of a trianglepython generate a random numberpython convert kilometers to milespython convert celsius to fahrenheitpython check if a number is positive or negativepython check if a number is odd or even

Python Program to Check if a Number is Odd or Even

1number = int(input("Enter a number: ")) 2if (number % 2) == 0: 3 print(f"{number} is Even") 4else: 5 print(f"{number} is Odd")

Output 1

1Enter a number: 22 222 is Even

Output 2

1Enter a number: 53 253 is Odd
Previous
python check if a number is positive or negative
Learn. Code. Upskill.

Tutorial

  • Python Tutorial
  • Javascript Tutorial
  • SQL Tutorial
  • C Tutorial
  • C++ Tutorial
  • HTML Tutorial
  • C# Tutorial
  • Swift Tutorial

Courses

  • Python Courses
  • Nodejs Courses
  • Javascript Courses
  • ReactJs Courses
  • Django Courses
  • Mysql Courses
  • Swift Courses

Company

  • About Us
  • Privacy Policy
  • Terms & Conditions
  • Contact

Copyright © 2023 ProgramDoc. All Rights Reserved.