python

python

Python program to convert centimeter to inches

Python program to convert centimeter to inches. This python program will take the distance in centimeter from the user and print it in inches.

Read
python

Write a python Bank account class with withdraw/deposit features

Python program to write a bank account class with withdraw/deposit features like check current balance, withdraw money and deposit money. It will work with user input values.

Read
python

Recursion program to find the power of a number in Python

Python program to find the power of a number recursively. Recursive function calls itself repeatedly to get the power of a given number.

Read
python

Python program to remove the last character of a string

How to remove the last character of a string in python. We will learn two different ways to do that. By using rstrip and by using negative index slicing.

Read
python

How to create a color choosing dialog in tkinter python

Python tkinter example to create a color choosing dialog. We can use tkinter.colorchooser module to create a color chooser dialog.

Read
python

Python program to check if two sets are equal in 3 ways

Python program to check if two sets are equal or not in 3 different ways. We will learn how to use the equal to operator, not equal to operator, symmetric_difference() method and also the difference() method.

Read
python

How to write a simple stopwatch in python

Python program to write a stopwatch. This stopwatch will record the time and once stopped, it prints the time spent.

Read
python

How to insert an item to the start of an Ordered dictionary in Python

Python program to insert items to the start of an ordered dictionary. Ordered dictionary remembers the key-value pairs inserted.

Read
python

Python program to search for a text in a file

Python program to search for specific text in a text file. It will read the text from the user and search for that text in a given file.

Read
python

Python program to find the volume of a tetrahedron

Learn how to find the volume of a tetrahedron in Python using user inputs. Tetrahedron is a triangular pyramid and this program will show you how to find the volume in python.

Read