Python

Python 3 Code Examples15 min read

Python Programs for Practice

Welcome to our section dedicated to the Python programming language. You will find a set of information related to this language (course support, code examples, …).

Here is a small examples of python programming language.

How to Print “Hello World!” in Python

Python 3 Code:




Output:

How to Add Two Variables in Python

Python 3 Code:

Output:

How to  Find the Square Root in Python

Python 3 Code:

Output:

How to Calculate the Area of a Triangle in Python

Python 3 Code:

Output:

How to Calculate the Area of a Circle in Python

Code:

Output:

How to Solve Quadratic Equation in Python

Output:

 

How to Swap Two Variables in Python

Output:

How to Generate a Random Number in Python

Output:




How to Convert Kilometers to Miles in Python

How to Convert Celsius To Fahrenheit in Python

 

How to Find the Sum of Numbers in a List in Python

Example Code:

Output:

How to to Check if a Number is Positive, Negative or 0 in Python

How to Check if a Number is Odd or Even in Python

How to Check Leap Year in Python

How to Find the Largest Among Three Numbers in Python

How to Check Prime Number in Python




How to Print all Prime Numbers in an Interval in Python

How to Find the Factorial of a Number in Python

How to Display the multiplication Table in Python

How to Print the Fibonacci sequence in Python

How to Check Armstrong Number in Python




How to Find Armstrong Number in an Interval in Python

How to Find the Sum of Natural Numbers in Python

How to Display Powers of 2 Using Anonymous Function in Python

How to Find Numbers Divisible by Another Number in Python

How to Convert Decimal to Binary, Octal and Hexadecimal in Python

How to Find ASCII Value of Character in Python

How to Find HCF or GCD in Python

How to Find LCM in Python




How to Find Factors of Number in Python

How to Make a Simple Calculator in Python

How to Display Calendar in Python

How to Display Fibonacci Sequence Using Recursion in Python

How to Find Sum of Natural Numbers Using Recursion in Python

How to Find Factorial of Number Using Recursion in Python




How to Convert Decimal to Binary Using Recursion in Python

How to Add Two Matrices in Python

How to Transpose a Matrix in Python

How to Multiply Two Matrices in Python

How to Check Whether a String is Palindrome or Not in Python

How to Remove Punctuations From a String in Python

How to Sort Words in Alphabetic Order in Python

How to Illustrate Different Set Operations in Python

How to Count the Number of Each Vowel in Python

Leave a Comment