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 […]
Category: Python
Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991…
In this category, we will cover topics like data types, operators, keywords, functions, loops, conditional statements, etc….
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 […]
Operators in Python
Operators are used to performing operations on values. Operators in Python are divided into the following categories : Arithmetic operators Assignment operators Logical operators Comparison operators Identity operators Membership operators Bitwise operators Arithmetic operators: These operators are used to perform mathematical operations (addition, subtraction, multiplication, division) on numerical values. “+”: This operator is used to […]
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 Lists
The List is a collection of heterogeneous data type that is ordered and changeable i.e. mutable. It allows duplicate members. Creation of list: Using square brackets: Output: [] [‘apple’, ‘orange’, ‘kiwi’] Using list() built-in function: Output: [] [‘a’, ‘p’, ‘p’, ‘l’, ‘e’] Access elements of the list: We can access any element from the list […]
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.
Introduction To Python Programming Language
Python is a general-purpose programming language which is high level, interpreted language with easy syntax and dynamic semantics. It was created by Guido Van Rossum in 1991.