Skip to main content

Python Tutorial

Management System in Python - #4 - Finding Records & Resetting Files

Introduction: In this tutorial we will continue making our local user management system in Python. In part three we made the remove record function which paired with a lot of other new functions. Important: Although I keep interchanging the words records and users, this system can be used to keep any records of information, but I am using this example as a user management system. Now: This

Management System in Python - #3 - Removing Records/Users

Introduction: In this tutorial we will continue making our local user management system in Python. In part two we made the list users and change file path options, now we are going to be making a remove users function/choice/option in the menu. Important: Although I keep interchanging the words records and users, this system can be used to keep any records of information, but I am using this

Management System in Python - #2 - Settings Menu, File Path Setting & Listing Users

Introduction: In this tutorial we will continue making our local user management system in Python. In part one we made the main menu system, and the first option to add a user. This tutorial will be on a second option, listing users, and a settings option to change the file name. Important: Although I keep interchanging the words records and users, this system can be used to keep any records of

Management System in Python - #1 - Main Menu & Adding Users

Introduction: In this tutorial we will begin making a local user management system in Python. We have done this before in a simple SQLite database, but this series will be storing the information in simple plain text files ready for editing manually and portable safe. The Main System: First we want to create a main function which will be our menu system. The user will loop around this until they

How to Create a User Management System in Python Using SQLite

Introduction: This tutorial is on how to create a user management system in Python using SQLite. The Database: First we need to create the database to store the information, to do this open CMD (on Windows) and type cd followed by your SQLite installation path, mine is: cd /d G: cd Libaries\Documents\SQLite Now we use the command sqlite3 followed by the database name followed by the extension for

How to Use Databases (SQLite) in Python

Introduction: This tutorial is on how to set up SQLite and Python to use databases within your scripts. Downloading SQLite: First we need to download SQLite. To do this, go to http://sqlite.org/download.html and download the latest pre-compiled binary release for your operating system - I am using Windows, I am unsure if this tutorial 100% works with other systems. Once you have downloaded it, use

How to Create a Hangman Game in Python

Introduction: This tutorial will be covering how to create a hangman game based on ASCII characters in Python. Imports: First we need to import the random package to randomise which word the PC will choose... import random; Variables: Next we need a list of possible words for the pc to choose, we use a full caps name and a tuple to store the list of information because it will not change

How to Create a Simple Calculator in Python

Introduction: This tutorial is on how to create a simple calculator in Python. The Theory: Here's how the program will be structured: Get the users first number Get the users second number Get the users action Use if statements to perform the calculation Print out the result Getting The Users Numbers: First we want to get the users two numbers to calculate together somehow. We use input statements

How to Create a Rock Paper Scissors Game in Python

Introduction: This tutorial will be covering how to make a simple rock, paper, scissors game in Python. How It Works: First we get the user choice through input. Then we generate a random number 1 through 3. Convert the random number to rock, paper or scissors. Output the comparison result. Imports: To generate a random computer choice we need to import the random module... import random; User

How to Create a Text Explorer Game in Python

Introduction: This tutorial will cover how to create a simple text based exploration game. How It Works: What we are going to do is; Give the user instructions. Show the current place where the user is within the game. Give the user options. Take them in the direction they enter. Restart loop from step 3. The Instructions: So the first thing we do is give the user instructions on how to play the