Python Programmer Logo Python Programmer Python Programmer Logo


Here you will find the video tutorials embedded and their associated python files


My old files (not associated with any video)

Miscellaneous files

File Download Date Modified
Critters vs Aliens Download File 10 Jul 2022
Python Circles Download File 7 Oct 2022
Shapes drawer Download File 15 Oct 2022
Shuffle array Download File 14 Mar 2023
String Hyphenator Download File 25 Oct 2023
Student Names Download File 9 Jun 2021

Maths Maze Navigator

File Download Date Modified
Full Folder (Zip) Download File 29 Mar 2023
Controls (png) Download File 5 Nov 2022
Easy Qs (txt) Download File 18 Mar 2023
GCSE Qs (txt) Download File 18 Mar 2023
Game Save Class (py) Download File 19 Dec 2022
Game Save Test (py) Download File 19 Dec 2022
Hard Qs (txt) Download File 22 Mar 2023
High Scores Class (py) Download File 28 Dec 2022
High Scores Test (py) Download File 25 Dec 2022
High Scores (txt) Download File 1 Apr 2023
Hint (png) Download File 26 Feb 2023
Information Objects (py) Download File 26 Feb 2023
Instructions (png) Download File 5 Nov 2022
Key (png) Download File 19 Oct 2022
Load (png) Download File 21 Dec 2022
Load Screen (png) Download File 23 Apr 2023
Lose Screen (png) Download File 21 Dec 2022
Main (py) Download File 29 Mar 2023
Math Qs (txt) Download File 4 Dec 2022
Maths Quiz (py) Download File 8 Mar 2023
Maze Objects (py) Download File 19 Oct 2022
Maze Info (txt) Download File 31 Mar 2023
Medium Qs (txt) Download File 22 Mar 2023
NS Qs (txt) Download File 4 Dec 2022
Other Objects (py) Download File 16 Mar 2023
Player (png) Download File 19 Oct 2022
Player Class (py) Download File 22 Jan 2023
QS Objects (py) Download File 10 Jan 2023
Questions Test (py) Download File 20 Mar 2023
Save (png) Download File 21 Dec 2022
Save Screen (png) Download File 23 Apr 2023
Stack Class (py) Download File 20 Jan 2023
Starting Objects (py) Download File 5 Nov 2022
Undo (png) Download File 22 Jan 2023
Win Screen (png) Download File 21 Dec 2022

Battery Percentage

File Download Date Modified
Notifier Download File 24 May 2023
Emailer V1 Download File 25 May 2023
Emailer V2 Download File 25 May 2023

Challenges

File Download Date Modified
Coding Challenges Download File 29 Dec 2021
Euler Challenges Download File 29 Nov 2022
Python Coding Challenges Download File 25 May 2023

Cool Tkinter Features (Tkinter Tips and tricks video)

Preview of code


from tkinter import *
from tkinter.ttk import *

def on_click():
    label2 = Label(text="Button clicked!")
    label2.grid(row=3, column=0)
    tree.insert('', 'end', text='Listbox', values=('15KB', 'Yesterday', 'mark'))
    p.step(amount=5)

win = Tk()

label1 = Label(text="Here is a cool ttk widget")
label1.grid(row=0, column=0)

button1 = Button(win, text="Click me!", command=on_click)
button1.grid(row=2, column=0)
...

Click this link for more information


Input/Output Tutorial (Python Basics #1)

Preview of code


"""This tutorial will show a lot of basic input/output functions and methods so that
you can start your python programming journey. It wil focus on efficiency and won't
be too complex, there will be more advanced tutorials on my channel in future, so be
sure to like and subscribe."""

#The first in-built function you need to know is print
print("Hello world")
"""This will allow you to display a piece of text of your choosing to the screen,
in this app it will display to the window on the right -->"""

#Now I will run the program

#So now let's do something a bit more advanced

#let's say we want to store something in memory then print it

#We use a variable, you can name it whatever you want, but it should be descriptive

name = "John"
"""That is one example of a variable, now we can use it to print the name of someone,
however, it doesn't need to be the only thing in the print statement, you can use a comma,
to seperate the name and any text you want to put in as well"""

print("My name is:",name)
...

Click this link for more information


Pattern Printing Tutorial [Intermediate] (Short tutorials)

Preview of code


#Welcome back to another python programming tutorial
"""Today we're gonna be building a program that lets
you print out a pattern using a for loop"""

#Start with some general numbers realted with the pattern

i = 5
j = 2
h = 3

#Now apply the for loop
for num in range(i):
    #Now print an asterisk for each i
    print("*"*i,end="")
...

Click this link for more information


GUI Calculator Tutorial [Intermediate]

Preview of code


"""Today we're going to show you guys how to build a
GUI calculator using tkinter and the math libraries"""

#First we need to import the libraries

import tkinter, math

#We then need to set up a global variable
expression = ""

#A main function needs to be created

def main():

    #Some functions for the buttons are now needed
    def press(num):
        global expression
        expression += str(num)
        equation.set(expression)
...

Click this link for more information


Numpy Showcase (Tips and tricks)

Preview of code


#Numpy tips and tricks
import numpy as np

a = np.array([5,3,7])
b = 2

print(a+b)
"""Here this is called broadcasting, it allow the operator
addition to be applied between b and a element-wise, even
though b is just a numbver and a is an array it will add
b to each element of a"""

#Now let's run it

#We have to define data types for an array
dt = np.dtype([('name', np.str_, 16),
               ('age', np.int32),
               ('weight', np.float64)])

#Now we can create a structured array
data = np.array([('Jake', 19, 74.5),
                 ('Sally', 23, 64.3),
                 ('Jack', 16, 78.9)], dtype=dt)

#print(data)
...

Click this link for more information


String Methods & Conditional Statements Tutorial (Python Basics #2)

Preview of code


#Today we will be looking at String methods and conditional statements

"""This program will closely examine some of the various string methods and also
will look at conditional statements (if, elif, else) and also the boolean operators"""

#below is an example of a string
myString = "Hello, This is a string!"

#First we'll start with string slicing
#print(myString[:5]) #This will print out the first 5 characters of 'myString'
#print(myString[10:]) #This will print from character 10 till the end
#print(myString[6:11]) #This will print from character 6 until character 10 (not including 11)

#You can also get a single character from a string, this time we'll ask the user
#character = int(input("Enter a character number (index) to retrieve from string: "))
#print("The character is:",myString[character])
...

Click this link for more information


Caesar Cipher Tutorial [Intermediate] (Short Tutorials)

Preview of code


#Caesar Cipher

#Now we have to define the function
def encrypt(text, key):
    result = '' #setting up an empty variable first
    #Now it's a for loop
    for char in text:
        if (char.isupper()):
            result += chr((ord(char)+key-65)%26+65)
            #Above, that is the formula for the encryption
        else:
            result += chr((ord(char)+key-97)%26+97)
    #Now all we have to do is return the final result
    return result
...

Click this link for more information


Find Max Num from File [Intermediate] (Short Tutorials)

Preview of code


#Max num from file, method 1

#First, let's open and read from the file
file = open("nums.txt")
fileContents = file.readlines()

#The first methiod is using a for loop
#Nearly forgot the variable
maxNum = 0
thisLine = 0
for count, line in enumerate(fileContents):
    num = int(line.strip())
    if num > maxNum:
        maxNum = num
    #using this method, we can aslo output the line num
        thisLine = count
...

Click this link for more information


Loops [Iteration] and File Handling (Python Basics #3)

Preview of code


"""Ok so I've explained a bit about iteration loops and file handling, now we will
move on into the coding examples, be sure to follow along if you're watching
from home and want to learn python"""

"""#In a for loop, we don't need any pre-defined variables
for num in range(5):
    print("The number is:",num)
    #This will print out the numbers from 0 to 4 (not including 5)

#For loops are very useful, but only if we know the amount of times we're looping
for i in range(1,6):
    #here we are looping from 1 to 5 (not including 6)
    print("I have",i,"apples")

#Anyway now let's look at counting backwards
for count in range(5, 0, -1):
    #-1 will allow us to go backwards by 1 each time
    print("Numbers till countdown ends:",count)

#We can also loop in increments, for example every even number (up to a point)
for number in range(0, 22, 2):
    #This will print out every even number from 0 to 20
    print("The even number is:",number)
...

Click this link for more information