# Tag Archives: Python Program

## Python Programs to Print Pattern – Print Number, Pyramid, Star, Triangle, Diamond, and Alphabets Patterns

Printing patterns using Programming languages is one of the most common interview problems. In this tutorial, we will see how we can use the Python programming language to print different patterns. This tutorial includes the following Patterns in Python Number patterns Triangle patterns Start * patterns Pyramid patterns Inverted Pyramid patterns Half Pyramid patterns Diamond patterns Alphabets patterns… Read More »

## Python Program to Make a Simple Calculator

Here in this article, we have provided a python source code for a simple calculator that can perform basic arithmetic operations such as Addition, Multiplication, Division, subtraction, and modules. Prerequisite topics to create this program. Python Input, Output Python Data types Python User-defined Functions Python Arithmetic Operators Python If…..elif statements. Steps Create 4 different functions add(), sub(), mul(),… Read More »

## Python Program to Find the Factors of Number

Python Program to Find the Factors of a Number: Here in this article, we have written a python code that asks the user to enter a number and print all the factors of that number as an output. Prerequisite topics to create this program. Python Input, Output Python Data types Python User-defined Functions Python Loop Steps Create a… Read More »

## Python Program to Find LCM

Here we have provided a python source code that asks the user to enter 2 numbers and in Output, it prints the LCM. Prerequisite topics to create this Program Python Input, Output Python Data types Python User-defined Functions Python Loop LCM: LCM stands for Least Common Multiple, and the LCM of two numbers represents the least positive number… Read More »

## Python Program to Find ASCII Value of Character

Here we have provided a python source code that can find the ASCII value of the user entered character. ASCII Code or value: ASCII stands for  American Standard Code or Information Interchange, and it is used to represent 128 characters as numbers, which include special symbols too. Prerequisite topics to create this program Python Input, Output python ord() Steps Ask the… Read More »

## Python Program to Convert Decimal to Binary, Octal and Hexadecimal

There are various number systems in use. Although the decimal number system is the one that is most widely used, we have other number systems like binary, octal, and hexadecimal that we use. Usually, we use these in computers. Here, we will discuss a Python program to convert a decimal value to binary, octal, and hexadecimal values. In… Read More »

## Python Program to Find Numbers Divisible by Another Number

In this article, we will provide Python source code that can find the numbers divisible by another number, specifically, from a list of numbers. Prerequisite Topics to Create the Program Python Input/Output. Python Lambda functions. Filter function in Python. Python operators. Python split operator. Steps to Create the Program First, we ask the user to enter the values… Read More »

## Python Program to Display Powers of 2 Using Anonymous Function (lambda Function)

Here in this tutorial, we will talk about a Python program that can print the powers of 2 using the Python lambda or Anonymous function. Python Concepts Utilized in the Program Python Input, Output Lambda function Python Operators Python Loop Map function Steps to Create the Program First, we ask the user to enter a number n, which… Read More »

## Python Program to Find the Sum of Natural Numbers

Here in this article, we have provided a python program that can find the sum of n natural numbers using Python loop. Prerequisite topics to create this Program Python Input, Output Python if…else statement Python Data types Python Operators Python Loop Steps First, we ask the user to enter a number n. Using the int() function we will… Read More »

## Python Program to Find Armstrong Number in an Interval

Here in this article, we have provided a Python program that asks the user to enter the lower and upper limit numbers, and the program computes all the Armstrong numbers present in between those two numbers. Before discussing the Python code to find Armstrong Number in an interval, let’s know a little more about the concept of Armstrong… Read More »