Python Tutorial

  • Submitted by: 
    In this tutorial we will try to create a Simple Calculator Using Python . Python has a design philosophy which emphasizes code readability. That's why python is very easy to use especially for beginners who just started programming. It is very easy to learn the syntax emphasizes readability and it can reduces time consuming in developing. So let's now do the coding. Setting up the Python First...
  • Submitted by: 
    Introduction: This tutorial is on how to create a random number generator in Python. Imports: Before we begin, we first need to import the random module... import random This allows us to use the random modules functions such as 'randrange' and 'randint'. Random From Zero: To get a random number from the beginning (zero/0), we can simply call the 'randrange' function from the random module and...
  • Submitted by: 
    Introduction: This tutorial is on how to create a simple, hardcoded polling system in Python. Hardcoded? Hardcoded is when something is coded directly in to the program, other terms include; hardcoding and hardcode. I would only recommend harcoding if the amount that needs to be hardcoded is very small (such as only a few options in this polling system). This is similar to the use of loops. You...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    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...
  • Submitted by: 
    Introduction: This tutorial is going to cover how to create a simple, text based tic-tac-toe (three in a row) game in Python. The Variables: First we need to create some variable that will be used throughout the game. The constants are used to hold the board size, and the character value of each possible state of one field within the board... X = "X" ; O = "O" ; EMPTY = " " ; SIZE = 9 ; Next we...
  • Submitted by: 
    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...
  • Submitted by: 
    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...

Pages