Posts From Python Programming Examples

Exit A Python Program

Exit a Python Program in 3 Easy Ways!

Hey, all. In this article, we will be having a look at some functions that can be considered as handy to perform this task — Exit a Python program. Technique 1: Using quit() function The in-built quit() function offered by the Python functions, can be used to exit a Python program. Syntax: As soon as […]

Pascal's Triangle Using Python

Pascal’s Triangle using Python

Pascal’s triangle is a nice shape formed by the arrangement of numbers. Each number is generated by taking the sum of the two numbers above it. The outside edges of this triangle are always 1. The triangle is as shown below. Briefly explaining the triangle, the first line is 1. The line following has 2 […]

List Files Python Featured Image

How to List Files in a Directory Using Python?

In this tutorial, we’re covering everything you need to know about how to list files in a directory using Python. Python is a general-purpose language, used in a variety of fields like Data Science, Machine Learning, and even in Web Development. There seems to be no restriction in the application of Python Language. Therefore, it […]

Python Send Email

Python HowTo – Sending Emails using Python

Hello everyone! In today’s article, we’ll be taking a look at how we can use Python to send emails. Sending Emails – A brief overview Usually, the task of sending emails is done using the MTP (Mail Transfer Protocol). In the present day, there is a separate protocol called SMTP (Simple Mail Transfer Protocol) which […]

Mastermind Game Featured Image

Create Mastermind Game in Python – Code a code-breaking game

Mastermind is a two-player code-breaking game, in which one player hides a code consisting of colors, while the other player has to guess it using clues given by the former player for each turn. In this tutorial, we will be creating our own Mastermind Game using Python Language. In our version of Mastermind, the computer […]

Hi Lo Pygame Featured Image

PyGame Tutorial: Graphical Hi-Lo Game in Python

PyGame is a 2D game development library in Python. It contains specific functions and classes required for a programmer to create a simple or complex game from scratch. In this tutorial, we will be creating our own Hi-Lo game using PyGame Library. Hi-Lo is a very straightforward Casino game where the player has to guess […]