Day: January 4, 2021

Python Examples for Beginners: Python Code to Check if a Number is Odd or Even

(Python Tutorials for Citizen Data Scientist) Python Program to Check if a Number is Odd or Even In this example, you will learn to check whether a number entered by the user is even or odd. A number is even if it is perfectly divisible by 2. When the number is divided by 2, we …

Python Examples for Beginners: Python Code to Check if a Number is Positive, Negative or Zero

(Python Tutorials for Citizen Data Scientist) Python Program to Check if a Number is Positive, Negative or Zero In this example, you will learn to check whether a number entered by the user is positive, negative or zero. This problem is solved using if…elif…else and nested if…else statement. Source Code: Using if…elif…else num = float(input(“Enter …