In this post, we will write a Python program for how to find ASCII value. First, let’s see What is ASCII value? In programming languages, the characters (variable) holds ASCII value which is an integer number rather than that character itself is known as the ASCII value of character. ASCII stands for American Standard Code […]
Category: Programs
This python section contains a wide collection of programming examples. The examples are categorized based on the topics including List, strings, dictionary, tuple, sets, and many more. Each program example contains multiple approaches to solve the problem.
Python – Program to Find Circumference of a Circle
In this post, we will write a program for how to calculate circumference of a circle in python. First, let’s see What is Circumference of Circle? The perimeter is the curve length around any closed figure. Formula: Circumference of Circle: C = 2 * pi * r Where, r = Radius of circle pi = […]
Python – Program to Find Area of a Circle
In this post, we will write a program for how to calculate the area of a circle in python. First, let’s see What is the Area of Circle? The area enclosed by a circle of radius r in 2-dimensional plane. Formula: Area of circle: A = pi * r * r Or pi * r […]
Python – program to calculate Compound Interest
In this post, we will write a program for how to calculate compound interest in python. First, let’s see What is compound Interest? Compound Interest is also called compounding interest which is calculated on the principal (initial principal) that is the addition of interest to the principal sum of a loan or deposit. The formula […]
Python – program to calculate simple interest
In this post, we will write a program for how to calculate simple interest in Python. First, let’s see What is Simple Interest? Simple interest is an interest calculated on the principal amount of a loan or the original contribution to a savings account. Simple Interest: I = (P * R * T) / 100 […]
Python – program to print odd natural number upto n
In this post, we will see programs for how to print odd natural numbers up to n in python, provided n is positive. Odd Number : Any integer either positive or negative, which can not be divided exactly by 2 is an odd number. The numbers having the last digit is 1, 3, 5, 7 […]
Python – program to print first n odd natural numbers
In this post, we will see how to print first n odd natural numbers in python? Odd Numbers: Any integer that is positive or negative which can not be divided exactly by 2 is an odd number. The numbers having the last digit is 1, 3, 5, 7 or 9 are odd numbers. Note: Natural […]
Python – program to print first n even natural numbers
In this post, we will see how to print first n even natural numbers in python? Even Numbers: Any integer that is positive or negative which can be divided exactly by 2 is an even number. The numbers having the last digit is 0, 2, 4, 6 or 8 are even numbers. Note : Natural number is positive integers. It’s range […]
Python – program to print even natural number upto n
we will see programs for how to print even natural number upto n in python, provided n is positive.