# The fizzbuzz program in python

The FizzBuzz program is a great way to test your Python skills in regards to conditions and loops. The task is to loop through the numbers between 1 and 100, and for each number, check if it is divisible by 3. If it is, print “fizz.” If it is divisible by 5, print “buzz.” IfRead More »

# Python program to add two numbers

The addition operator (+) is widely used in programming languages, including Python, to add two or more values together. In its simplest form, Python allows for easy addition of numbers by directly entering the values into the command line. For example, you can add two numbers by simply typing them in the Python command lineRead More »

# Program to find factorial of a number in python

“Discover the Different Ways to Find the Factorial of a Number in Python” In mathematics, the factorial of a number is the product of all the integers from 1 to that number. The factorial of a number is represented by an exclamation mark (!) following the number. For example, the factorial of 4 is writtenRead More »

# Armstrong number in python

An Armstrong number, also known as a narcissistic number, is a special type of number that possesses a unique mathematical property. The property states that the number is equal to the sum of each of its digits raised to the power of the number of digits in the number. For example, an Armstrong number ofRead More »

# Prime number program in python

A prime number is a number that is only divisible by 1 and itself. With the power of Python programming, we can easily determine if any given number is a prime number or not. Furthermore, we can also find all prime numbers within a given range of numbers, such as from 2 to N. InRead More »

# Write a program to print the Fibonacci series in python.

The Fibonacci sequence is a well-known pattern of numbers that has been used in mathematics since antiquity. This series is characterised by each number being the sum of the two numbers prior, which always begin with 0 and 1. To generate a Fibonacci series of any length, simply add the two numbers preceding it togetherRead More »

# Python hello world program

Python is a scripting language that runs using a python interpreter. The interpreter converts the program (python text file with “.py” extension) into hardware understandable format. Let us see a simple hello world program using python language. While we install the python program, it gives a set of executables in which one executable is “python”Read More »

# Multiple prints in same line using Python

Generally, Python has a print function to print the single mandatory argument on the standard output stream. Before we jump into our topic, we need to understand the print function and its parameters. This function has five parameters including its four optional parameters. Let’s see what each of these parameters do. As per the printRead More »

# Python set and its methods with examples.

Python set is an iterable collection and its not different than a mathematical set of objects. The following are the different properties of this. A set does not contain duplicate values. Order of the elements not necessarily be same as its order of insertion. Items can not be modifiable, whereas we can modify set asRead More »

# Python list object and its methods with examples

Python list is a container, a doubly-linked list that stores any kind of values. It has a whole set of supported methods that are useful to do any sort of operation on this. All functions are as follows. append count copy insert extend pop remove clear index reverse sort append The append method adds theRead More »

# Print all common and unique (uncommon) elements in two lists using python

In order to find the matching and distinct elements in two lists in Python, we make use of the set utility functions. By employing the set functions, we can obtain both the common and unique items in both input lists. Specifically, we use the ‘&’ operation with the sets generated from the two input listsRead More »

# Python MySQL database connectivity and running queries on it

Before we start learning the database connectivity with Python, I hope you have basic knowledge of Python and some basic MySQL queries knowledge. Without directly jumping into the code, let’s first see the database connector requirement and see how to install the connector in your Linux machine. Once we install MySQL-python connector modules, we canRead More »