Skip to content

Instantly share code, notes, and snippets.

View ROBOMASTER-S1's full-sized avatar
:octocat:
Computer Science & Python Programming Examples

Welcome To My Virtual Computer Science Research Laboratory ROBOMASTER-S1

:octocat:
Computer Science & Python Programming Examples
View GitHub Profile
@ROBOMASTER-S1
ROBOMASTER-S1 / Tk Teacherless School.py
Last active March 9, 2023 04:50
Tk Teacherless School Python Program Examples: Created by Joseph C. Richardson
'''
# These are just Tkinter experiments, I've been learning and still am learning.
# I don't explain how to understand Tkinter, which is why it's called Tk Teacherless School.
# Created by Joseph C. Richardson, GitHub.com
# Tkinter Borders
'flat'
'solid'
@ROBOMASTER-S1
ROBOMASTER-S1 / My TKINTER CLOCK
Created March 8, 2023 06:52
My TKINTER CLOCK Python Program Example: Created by Joseph C. Richardson
'''
My TKINTER CLOCK Python Program Example:
Created by Joseph C. Richardson, GitHub.com
'''
import tkinter as tk
import time as tm
window=tk.Tk()
@ROBOMASTER-S1
ROBOMASTER-S1 / Tkinter Button and Label.py
Last active March 8, 2023 02:12
Tkinter Button and Label Python Program Examples: Created by Joseph C. Richardson
# Let's create a button with tkinter and see what happens when
# you type and execute/run the tkinter program example below.
# Created by Joseph C. Richardson, GitHub.com
from tkinter import*
button=Tk()
button.geometry('500x500')
@ROBOMASTER-S1
ROBOMASTER-S1 / Tkinter Canvas.py
Last active March 7, 2023 16:50
Tkinter Canvas Python Program Example: Created by Joseph C. Richardson
'''
Welcome to tkinter, the canvas part of Python. With tkinter you can draw
lines and shapes such as ovals, arcs and rectangles. You can also create
some wild digital string-art designs with for-loops. With tkinter you can
also create buttons and input boxes. We will get into all this and more about
tkinter, the fun part of Python programming.
'''
# Created by Joseph C. Richardson, GitHub.com
# Let's create a simple tkinter window. Type and execute/run
@ROBOMASTER-S1
ROBOMASTER-S1 / Tk Laser Wars Screensaver.py
Last active March 10, 2023 08:10
Tk Laser Wars Screensaver Python Program Examples: Created by Joseph C. Richardson
'''
Have some fun with this little tkinter laser wars Python program example:
'''
# Created by Joseph C. Richardson, GitHub.com
from tkinter import*
from random import*
import time
my_window=Tk()
@ROBOMASTER-S1
ROBOMASTER-S1 / Raise Some Errors.py
Last active March 7, 2023 05:34
Raise Some Errors Python Program Example: Created by Joseph C. Richardson
# Raise a list of possible errors to test in Python programs.
# Created by Joseph C. Richardson, GitHub.com
try:
print('Raising a list of possible errors to test:')
raise Exception
raise ValueError
raise TypeError
raise NameError
@ROBOMASTER-S1
ROBOMASTER-S1 / Try and Except Skeletal Structure.py
Created March 7, 2023 05:18
Try and Except Skeletal Structure Python Program Example: Created by Joseph C. Richardson
# Created by Joseph C. Richardson, GitHub.com
# Here is a basic, skeletal structure of a Try: and Except: block.
# The 'Pass' statement ignores any empty code blocks, which are
# not used for now. In this case, only the skeletal structure of the
# program is clearly shown. Note: you do not need to invoke the
# 'finally' statement into try: and Except: blocks, but they can be
# quite handy when you want to show any output on the screen,
# no matter the outcome of the program's execution/run.
@ROBOMASTER-S1
ROBOMASTER-S1 / Try and Except Error Handlers Scope.py
Last active March 7, 2023 05:05
Try and Except Error Handlers Scope Created by Joseph C. Richardson
'''
This is a complete scope of all the Try and Except Eorror handlers.
'''
# Created by Joseph C. Richardson, GitHub.com
except Exception:
except BaseException:
except ArithmeticError:
except BufferError:
except LookupError:
@ROBOMASTER-S1
ROBOMASTER-S1 / Class inheritance with functions.py
Last active March 7, 2023 04:45
Class inheritance with functions Python Program Examples: Created by Joseph C. Richardson
# Created by Joseph C. Richardson, GitHub.com
# Let's hurt our brain just a wee bit and create a class inheritance
# with two functions inside it. First, we will start off with creating
# two functions called student1 and student2. Next we will create
# two, separate classes called Student1 and Student2 and place
# our two functions inside them. After that, we will create our class
# inheritance called Students with our two classes inside it. Note:
# to be sure that each programming step works, type and execute/
# run each program example first, before you proceed to the next
@ROBOMASTER-S1
ROBOMASTER-S1 / The Enumerate Function.py
Created March 7, 2023 04:04
The Enumerate Function Python Program Examples: Created by Joseph C. Richardson
# Almost six years later, and I'm still learning how
# to master Python. I'm always trying new ideas through
# others so I can learn what Python is truly all about.
# Created by Joseph C. Richardson, GitHub.com
# Use the enumerate() function to loop through a list, using
# only two lines of code; one for the for-index enumerate()
# function and the other for the 'print' statement.