Basic Python Programs

This Basic Python programs set is designed for the Beginner in Python Programming Language. The syntax of the Python language is very clean and short compared to other programming languages. It’s really fun to work…

Swap Two Variables in Python

In this Basic Python Program, let’s have a look at “How to “Swap Two Variables in Python”. Here, Swapping means exchanging the value of variables. If x=2 & y=3 After swapping the value of x…

Check if a Number is Odd or Even in Python

In this Basic Python Program, we will have a look at “How to Check if a Number is Odd or Even in Python” Odd Number: A number which is not divisible by 2. Even number:…

Positive or Negative number in Python

In this In this Basic Python Program, we will have a look at “How to find if a given number is positive, negative or zero” Python Program To Find Positive or Negative number in Python…

Check If A Given Number Is Prime Number in Python

In this Basic Python Program, , we will have a look at how to write a code in python to find if a given number is prime or not. Python Program To Find If A…

Basic Calculator in Python

Let’s have a look at Basic Calculator in Python Programming language to get you started with the basic functions of Python. Calculator in Python Programming Language def add(x, y):   return x + y # This…

Hello World Program in Python

In this Basic Python Program, we will have a look at How to print “Hello World” with the help of Python Programming Language. print(“Hello World”) Output: Hello World

Factorial of a number in Python

In this Basic Python Program, we will find the factorial of a number. What is factorial of a number? In Mathematics, Factorial of a non-negative integer is multiplication of all integers smaller than or equal to…

Add Two Number In Python

In this basic python program, we will add two numbers and print the sum of the two numbers. Python program to add two numbers a= 10 b= 20 # summing up the two numbers sum…

Find the vertex, focus, and directrix of a parabola in python

In this python program, we will have a look at how to find the vertex, focus and directrix of a parabola in the Python programming language. Python Program To Find the vertex, focus, and directrix…